You are on page 1of 3

CS 4354

November 1, 20xx
3NF Homework

1. Consider the relation schema


R = ( R, F ) = ( { A,B,C,G,W,X,Y,Z},
{XZ→ZYB, YA → CG, C→W, B→G, XZ→G} )

a. Find a minimal cover for F.

G = {XZ→Y, XZ→B, YA →C, YA→G, C→W}


(AXZ)+ = {A, B, C, G ,W ,X ,Y ,Z}
b. Does F entail XZA → YB?
Yes, XZ→Y & XZ→B
c. Is the decomposition to ABXYZ and ABCGWY lossless?
No because {A,B,X,Y,Z} ∩ {A,B,C,G,W,Y} = {A,B,Y} and {A,B,Y} is not a key for
either relation in the decomposition.
d. Is the above decomposition dependency-preserving?
Yes, all the FD’s of the Minimum cover are in either the first or second part of the
decomposition.


CS 4354
November 1, 20xx
2. Consider the schema
R = ( R, F ) = ( { A,B,C,D,E},
{A→BC, CD → E, B→D, E→A} )
a. List the candidate keys for this relation.
{A}, {CD}, {E}
b. Is the decomposition to (A,B,C), (A,D,E) lossless?
Yes, (A,B,C) ∩ (A,D,E) = A, A is a key, therefore the decomposition is lossless.

c. Compute the canonical cover of F .

F = {A→B, A→C, B→D, E→A}


CS 4354
November 1, 20xx
3. A relation R is in 2NF if, for any attribute A in R, A is not partially
dependent on a candidate key. Show that every 3NF schema is in 2NF.
(Hint: Show that every partial dependency is a transitive dependency.)
For every partial key dependency, A→C in the example: Key: AB, FD: A→C, the partial
key (A→C), is dependent upon the key, FD: AB→A. Therefore, every partial key
dependency is a transitive dependency.

You might also like