0% found this document useful (0 votes)
200 views6 pages

CPSC 4620/6620 Quiz #6 Name: - Date

Here are the normalized tables: Tournaments Tournament Year Des Moines Masters 1998 Indiana Invitational 1998 Cleveland Open 1999 Des Moines Masters 1999 Indiana Invitational 1999 Winners Winner Winner Date of Birth Chip Masterson 14 March 1977 Al Fredrickson 21 July 1975 Bob Albertson 28 September 1968 Tournament Winners Tournament Year Winner Des Moines Masters 1998 Chip Masterson Indiana Invitational 1998 Al Fredrickson Cleveland Open 1999 Bob Albertson Des Moines Masters 1999 Al Fredrickson Indiana Invitational 1999 Chip Masterson This

Uploaded by

Rajesh Lohith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
200 views6 pages

CPSC 4620/6620 Quiz #6 Name: - Date

Here are the normalized tables: Tournaments Tournament Year Des Moines Masters 1998 Indiana Invitational 1998 Cleveland Open 1999 Des Moines Masters 1999 Indiana Invitational 1999 Winners Winner Winner Date of Birth Chip Masterson 14 March 1977 Al Fredrickson 21 July 1975 Bob Albertson 28 September 1968 Tournament Winners Tournament Year Winner Des Moines Masters 1998 Chip Masterson Indiana Invitational 1998 Al Fredrickson Cleveland Open 1999 Bob Albertson Des Moines Masters 1999 Al Fredrickson Indiana Invitational 1999 Chip Masterson This

Uploaded by

Rajesh Lohith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

CpSc 4620/6620 Quiz #6

Name:________________ Date:_____________
Question #1 (20 points):

Are the following statements true or false?


1. A trivial functional dependency Y→X means X only depends on Y slightly. ( F )
2. A multi-value dependency X→Y implies that values of attributes in Y depend on multiple
attributes in X. ( F )
3. A candidate key must be a superkey but a superkey may not be a candidate key. ( T )
4. If a set contains all the attributes in a relational table, this set must be a superkey. ( T )
5. It is possible to have multiple primary keys in a relational table. ( F )
6. Entity integrity requires every foreign key value must match a primary key value in an associated
table ( F )
7. We should avoid use of nullify insert or delete rules. Because the parent entity in a parent-child
relationship must exist, the nullify insert or delete rule violate this constraint. ( T )
8. Use cascade insert rule for generalization hierarchies to ensure that all instances in the subtypes
are also in the supertype. ( F )
9. If Z→Y and Y→X, X has a transitive dependency on Z. ( T )
10. Given two attributes X and Y, Y→X is a full functional dependency. ( T )

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.

1. Tournament Winners: _____2NF_______


2. Employees’ Skills: ___________1NF___________
3. CTX: _______BCNF___________
4. Today's Court Bookings: ____3NF____________
5. Travelling Salesman Product Availability by Brand: _______4NF_____________

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

Course Teacher Text


Physics Green Basic Mechanics
Physics Green Principles of Optics
Physics Brown Basic Mechanics
Physics Brown Principles of Optics
Math Green Basic Mechanics
Math Green Vector Analysis
Today's Court Bookings
Court Start Time End Time Rate Type • Each row in the table represents a court booking at a tennis club
that has one hard court (Court 1) and one grass court (Court 2)
1 9:30 10:30 SAVER • A booking is defined by its Court and the period for which the
Court is reserved
1 11:00 12:00 SAVER
• Additionally, each booking has a Rate Type associated with it.
1 14:00 15:30 STANDARD There are four distinct rate types:
o SAVER, for Court 1 bookings made by members
2 10:00 11:30 PREMIUM-B o STANDARD, for Court 1 bookings made by non-
members
2 11:30 13:30 PREMIUM-B o PREMIUM-A, for Court 2 bookings made by members
o PREMIUM-B, for Court 2 bookings made by non-
2 15:00 16:30 PREMIUM-A members

Travelling Salesman Product Availability By Brand


The table's predicate is: Products of the type
Travelling Salesman Brand Product Type designated by Product Type, made by the
brand designated by Brand, are available from
Jack Schneider Acme Vacuum Cleaner
the traveling salesman designated by Traveling
Jack Schneider Acme Breadbox Salesman.
Willy Loman Robusto Pruning Shears
Also the following rules apply: A Traveling
Willy Loman Robusto Vacuum Cleaner Salesman has certain Brands and certain
Willy Loman Robusto Breadbox Product Types in their repertoire. If Brand B1
and Brand B2 are in their repertoire, and
Willy Loman Robusto Umbrella Stand
Product Type P is in their repertoire, then
Louis Ferguson Robusto Vacuum Cleaner (assuming Brand B1 and Brand B2 both make
Louis Ferguson Robusto Telescope Product Type P), the Traveling Salesman must
offer products of Product Type P those made
Louis Ferguson Acme Vacuum Cleaner
by Brand B1 and those made by Brand B2.
Louis Ferguson Acme Lava Lamp
Louis Ferguson Nimbus Tie Rack
Question #5 (15 points): Please normalize the following tables to higher degree normal form
tables to address their anomaly problems.

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

Tournament Winners Winners


Tournament Year Winner Winner Winner Date of Birth
Indiana Invitational 1998 Al Fredrickson Al Fredrickson 21 July 1975
Cleveland Open 1999 Bob Albertson Bob Albertson 28 September 1968
Des Moines Masters 1999 Al Fredrickson Chip Masterson 14 March 1977
Indiana Invitational 1999 Chip Masterson

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

Employees’s Skills Work Location


Employee Skill Employee Current Work Location
Brown Light Cleaning Brown 73 Industrial Way
Brown Typing Harrison 73 Industrial Way
Harrison Light Cleaning Jones 114 Main Street
Jones Shorthand
Jones Typing
Jones Whittling

You might also like