CPSC 4620/6620 Quiz #6 Name: - Date
CPSC 4620/6620 Quiz #6 Name: - Date
Name:________________ Date:_____________
Question #1 (20 points):
Question #2 (25 points): Please briefly describe the minimum criteria for a relational table to be
2NF, 3NF, BCNF, 4NF, 5NF respectively.
2NF: The table (relation) must be in 1NF. Functional dependencies of non-prime attributes on candidate
keys are full functional dependencies. If a non-prime attribute of a table is functionally dependent on
only a part (subset) of a candidate key, this table is not in 2NF.
3NF: The table must be in 2NF. No non-prime attribute is transitively dependent on a candidate key. If a
non-prime attribute is only indirectly dependent (transitively dependent) on a candidate key, this table is
not in 3NF.
BCNF: A table is in Boyce-Codd normal form (BCNF) if and only if, for every one of its non-
trivial functional dependencies X → Y, X is a superkey. i.e., X is either a candidate key or a
superset thereof.
4NF: A table is in fourth normal form (4NF) if and only if, for every one of its non-trivial
multivalued dependencies X -->> Y, X is a superkey, i.e., X is either a candidate key or a
superset thereof.
5NF: The table must be in 4NF. A 4NF table is said to be in the 5NF if and only if every join
dependency in it is implied by the candidate keys.
Question #3 (15 points): Which three types of anomaly problems does the normalization
process try to address? Please use an example to explain the problem associated with each
anomaly type.
Update Anomaly: The same information may be expressed in multiple records; therefore
updates to the table may result in logical inconsistencies.
Example: Each record in the "Employees' Skills" table in Question #4 might contain an
Employee ID, Employee Address, and Skill; thus a change of address for a particular employee
will potentially need to be applied to multiple records (one for each of his skills). If the update is
not carried through successfully—if, that is, the employee's address is updated on some records
but not others—then the table is left in an inconsistent state.
Insert Anomaly: There are circumstances in which certain facts cannot be recorded at all.
Example: In the previous example, if it is the case that Employee Address is held only in the
"Employees' Skills" table, then we cannot record the address of an employee whose skills are not
yet known.
Delete Anomaly: There are circumstances in which the deletion of data representing certain
facts necessitates the deletion of data representing completely different facts.
Example: Suppose a table has the attributes Student ID, Course ID, and Lecturer ID (a given
student is enrolled in a given course, which is taught by a given lecturer). If in the early stages of
enrolment the number of students on the course temporarily drops to zero, then the last of the
records referencing that course must be deleted—meaning, as a side-effect, that the table no
longer tells us which lecturer has been assigned to teach the course.
Question #4 (25 points): What is the highest degree of normal form the following relational
tables comply with respectively? If a table does not comply with any degree of normal form,
state “none”. Please fill in the blanks with the appropriate degree of normal form.
Tournament Winners
Tournament Year Winner Winner Date of Birth
Des Moines Masters 1998 Chip Masterson 14 March 1977
Indiana Invitational 1998 Al Fredrickson 21 July 1975
Cleveland Open 1999 Bob Albertson 28 September 1968
Des Moines Masters 1999 Al Fredrickson 21 July 1975
Indiana Invitational 1999 Chip Masterson 14 March 1977
Employees' Skills
Employee Skill Current Work Location
Brown Light Cleaning 73 Industrial Way
Brown Typing 73 Industrial Way
Harrison Light Cleaning 73 Industrial Way
Jones Shorthand 114 Main Street
Jones Typing 114 Main Street
Jones Whittling 114 Main Street
Tournament Winners
Tournament Year Winner Winner Date of Birth
Des Moines Masters 1998 Chip Masterson 14 March 1977
Indiana Invitational 1998 Al Fredrickson 21 July 1975
Cleveland Open 1999 Bob Albertson 28 September 1968
Des Moines Masters 1999 Al Fredrickson 21 July 1975
Indiana Invitational 1999 Chip Masterson 14 March 1977
Customer
Customer ID First Name Surname Telephone Number
123 Robert Ingram 555-861-2025
555-403-1659
456 Jane Wright
555-776-4100
789 Maria Fernandez 555-808-9633
Customer
Customer ID First Name Surname Telephone 1 Telephone 2
123 Rachel Ingram 555-861-2025 Null
456 James Wright 555-403-1659 555-776-4100
789 Maria Fernandez 555-808-9633 Null
Employees' Skills
Employee Skill Current Work Location
Brown Light Cleaning 73 Industrial Way
Brown Typing 73 Industrial Way
Harrison Light Cleaning 73 Industrial Way
Jones Shorthand 114 Main Street
Jones Typing 114 Main Street
Jones Whittling 114 Main Street