Home>Mathematics homework help
CHAPTER 10: FUNCTIONAL DEPENDENCIES AND NORMALIZATION FOR RELATIONAL DATABASES
Answers to Selected Exercises
15.19 Suppose 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 (SSSN), current address (SCADDR) and phone
(SCPHONE), permanent address (SPADDR) and phone (SPPHONE), birthdate
(BDATE), sex (SEX), class (CLASS) (freshman, sophomore, ..., graduate),
major department (MAJORDEPTCODE), minor department (MINORDEPTCODE)
(if any), and degree program (PROG) (B.A., B.S., ..., Ph.D.). Both ssn and
student number have unique values for each student.
(b) Each department is described by a name (DEPTNAME), department code
(DEPTCODE), office number (DEPTOFFICE), office phone (DEPTPHONE), and
college (DEPTCOLLEGE). Both name and code have unique values for each
department.
(c) Each course has a course name (CNAME), description (CDESC), code number
(CNUM), number of semester hours (CREDIT), level (LEVEL), and offering
department (CDEPT). The value of code number is unique for each course.
(d) Each section has an instructor (INSTUCTORNAME), semester (SEMESTER), year
(YEAR), course (SECCOURSE), and section number (SECNUM). Section numbers
distinguish different sections of the same course that are taught during the same
semester/year; its values are 1, 2, 3, ...; up to the number of sections taught
during each semester.
(e) A transcript refers to a student (SSSN), refers to a particular section, and
grade (GRADE).
Design an 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 3NF or BCNF. Specify the key
attributes of each relation. Note any unspecified requirements, and make
appropriate assumptions to make the specification complete.
10.18 Prove or disprove the following inference rules for functional dependencies. A
proof can be made either by a proof argument or by using inference rules IR1 through IR3. A disproof should be done by demonstrating a relation instance that satisfies the conditions and functional dependencies in the left hand side of the inference rule but do not
satisfy the conditions or dependencies in the right hand side.
(a) {W ->Y, X ->Z} |= {WX ->Y }
(b) {X ->Y} and Z subset-of Y |= { X ->Z }
(c) { X ->Y, X ->W, WY ->Z} |= {X ->Z}
(d) {XY ->Z, Y ->W} |= {XW ->Z}
(e) {X ->Z, Y ->Z} |= {X ->Y}
(f) {X ->Y, XY ->Z} |= {X ->Z}
10.19 Consider the following two sets of functional dependencies F= {A ->C, AC ->D,
E ->AD, E ->H} and G = {A ->CD, E ->AH}. Check whether or not they are
equivalent.
10.22 What update anomalies occur in the EMP_PROJ and EMP_DEPT relations of
Figure 14.3 and 14.4?
10.23 In what normal form is the LOTS relation schema in Figure 10.11(a) with the
respect to the restrictive interpretations of normal form that take only the
primary key into account? Will it be in the same normal form if the general
definitions of normal form were used?
Answer:
If we only take the primary key into account, the LOTS relation schema in Figure 14.11
(a) will be in 2NF since there are no partial dependencies on the primary key .
However, it is not in 3NF, since there are the following two transitive dependencies on
the primary key:
PROPERTY_ID# ->COUNTY_NAME ->TAX_RATE, and
PROPERTY_ID# ->AREA ->PRICE.
Now, if we take all keys into account and use the general definition of 2NF and 3NF, t