Suppose that we have the following requirements for a university database that is used to keep track of students' transcripts: a. The university keeps track of each student's name (SNAME), student number (SNUM), social security number (SSN), current address (SCADDR) and phone \((\mathrm{SCPHONE}),\) permanent address \((\mathrm{SPADDR})\) and phone \((\mathrm{SPPHONE}),\) birth date \((\mathrm{BDATE})\) \(\operatorname{sex}(\operatorname{sex}), \text { class (cLass) (freshman, sophomore, } \ldots, \text { graduate }),\) major depart ment (MAJORCODE), minor department (MINORCODE) (if any), and degree program \(\left(p_{R O C}\right)(B, A,, B, S, \ldots, P H, D,) .\) Both sss \(N\) and student number have unique val. ues for each student. b. Each department is described by a name (DNAME), department code (DCOOE), office number (DOFFICE), office phone (DPHONE), and college (DCOLLECE). Both name and code have unique values for each department. c. Each course has a course name (cNAME), description (cDESC), course number (CNUM), number of semester hours (cREDIT), level (LEVEL), and offering depart. ment (coept). The course number is unique for each course. d. Each section has an instructor (INAME), semester (SEMESTER), year (YEAR), course (seccourse), and section number (secwum). The section number distinguishes different sections of the same course that are taught during the same semester/ year; its values are \(1,2,3, \ldots,\) up to the total number of sections taught during each semester. e. \(A\) grade record refers to a student \((\operatorname{ss} N),\) a particular section, and a grade \((\mathrm{CRADE})\) Design a relational database schema for this database application. First show all the functional dependencies that should hold among the attributes. Then design relation schemas for the database that are each in \(3 \mathrm{NF}\) or BCNF. Specify the key attributes of each relation. Note any unspecified requirements, and make appropriate assumptions to render the specification complete.

Short Answer

Expert verified
The database schema is designed by first isolating the entities and their respective attributes, identifying functional dependencies and normalizing the relations to 3NF or BCNF. Assumptions were made for unspecified requirements. The primary keys of each relation are also identified, which are unique for each entity.

Step by step solution

01

Identifying the Entities

The entities in this case would be: Student, Department, Course, Section, and Grade record. Each entity should represent an object that is essential in our database and has certain properties (attributes) that we want to record.
02

Identifying the Attributes

The attributes of each entity would be as follows: \n- Student: SNUM, SNAME, SSN, SCADDR, SCPHONE, SPADDR, SPPHONE, BDATE, sex, class, MAJORCODE, MINORCODE, PROC. \n- Department: DNAME, DCOOE, DOFFICE, DPHONE, DCOLLECE. \n- Course: CNUM, CNAME, CDESC, cREDIT, LEVEL, coept. \n- Section: secnum, INAME, SEMESTER, YEAR, seccourse. \n- Grade record: SSN, secnum, GRADE.
03

Identifying Functional Dependencies

Functional Dependencies would include: \n- Student: SNUM -> SSN, SNAME, SCADDR, SCPHONE, SPADDR, SPPHONE, sex, class, MAJORCODE, MINORCODE, PROC. \n- Department: DCOOE -> DNAME, DOFFICE, DPHONE, DCOLLECE. \n- Course: CNUM -> CNAME, CDESC, cREDIT, LEVEL, coept. \n- Section: secnum -> INAME, SEMESTER, YEAR, seccourse. \n- Grade record: SSN, secnum -> GRADE.
04

Normalization

The relations will be normalized to either 3NF or BCNF by ensuring that each entity is in 1NF (each column contains only indivisible values), is in 2NF (no non-prime attribute in the relation schema is functionally dependent on a part of any of its candidate keys) and is in 3NF (all determinants are candidate keys) or BCNF (every nontrivial functional dependency's determinant is a superkey). The primary keys would be SSN and SNUM for Students, DCOOE for Department, CNUM for Course, secnum for Section, and combination of SSN and secnum for Grade record.
05

Assumptions

Since it is not mentioned, for simplicity, we assume that the college attribute (DCOLLECE) for the department entity pertains to the university's various colleges rather than referring to other universities.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

} \\ \hline & & & \\ 10 & \mathrm{b} 1 & \mathrm{c} 1 & \\# 1… # Consider the following relation: $$\begin{array}{llll} \mathrm{A} & \mathbf{B} & \mathbf{C} & \text { TUPLE# } \\ \hline & & & \\ 10 & \mathrm{b} 1 & \mathrm{c} 1 & \\# 1 \\ 10 & \mathrm{b} 2 & \mathrm{c} 2 & \\# 2 \\ 11 & \mathrm{b} 4 & \mathrm{c} 1 & \\# 3 \\ 12 & \mathrm{b} 3 & \mathrm{c} 4 & \\# 4 \\ 13 & \mathrm{b} 1 & \mathrm{c} 1 & \\# 5 \\ 14 & \mathrm{b} 3 & \mathrm{c} 4 & \\# 6 \end{array}$$ a. Given the previous extension (state), which of the following dependencies may hold in the above relation? If the dependency cannot hold, explain why by specifying the tuples that cause the violation. i. \(A \rightarrow B,\) ii. \(B \rightarrow C,\) iii. \(C \rightarrow B,\) iv. \(B \rightarrow A, v . C \rightarrow A\) b. Does the above relation have a potential candidate key? If it does, what is it? If it does not, why not?

Define first, second, and third normal forms when only primary keys are considered. How do the general definitions of \(2 \mathrm{NF}\) and \(3 \mathrm{NF}\), which consider all keys of a relation, differ from those that consider only primary keys?

What undesirable dependencies are avoided when a relation is in \(3 \mathrm{NF}\) ?

Consider a relation \(R(A, B, C, D, E)\) with the following dependencies: \\[ A B \rightarrow C, C D \rightarrow E, D E \rightarrow B \\] Is \(A B\) a candidate key of this relation? If not, is \(A B D ?\) Explain your answer.

What role do Armstrong's inference rules- -the three inference rules IR 1 through IR3-play in the development of the theory of relational design?

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free