Model Answers for Assignment 3
Each exercise is worth 10 points (40 points total).
1. Exercise 3.2.1.
SOLUTION
The attributes are ABCD. We are given the FDs AB → C, C → D, and D → A.
(a) Consider all the possible left sides of a FD, namely, the non-empty subsets of the attributes. For each,
compute the closure, see if any new nontrivial FDs emerge. {A}
+
= A
{B}
+
= B
{C}
+
= ACD This adds the FD C → A.
{D}
+
= AD
{AB}
+
= ABCD This adds AB → D.
{AC}
+
= ACD This adds AC → D.
{AD}
+
= AD
{BC}
+
= ABCD This adds BC → A and BC → D.
{BD}
+
= ABCD This adds BD → A and BD → C.
{CD}
+
= ACD This adds CD → A.
{ABC}
+
= ABCD This adds ABC → D.
{ABD}
+
= ABCD This adds ABD → C.
{ACD}
+
= ACD
{BCD}
+
= ABCD This adds BCD → A.
{ABCD}
+
= ABCD
We have found 11 new FDs that follow from the original FDs.
(b) Looking at the above closures, we see that the keys are AB, BC, and BD. All the other sets whose closure
was ABCD are supersets of these three keys.
(c) The superkeys that are not keys are all the sets whose closure is ABCD but which are not one of the three
keys found in (b). They are ABC, ABD, BCD, ABCD.
2. Exercise 3.2.5.
SOLUTION
We prove the result by contradiction. Suppose that X → Y is a nontrivial FD. Then there must be an attribute
C in Y that is not in X. But then Y → C is a trivial FD that holds, and by transitivity, the FD X → C also
holds. C is not in X and X is a subset of the given relation's attribute set. Let Z be the set of all the attributes
that are not in X and are not C. Then XZ consists of all the attributes of the relation except C and the trivial
FD XZ → X holds. By transitivity, we get XZ → C, which the problem assumes doesn't exist. So by
contradiction, the FD X → Y can't hold as we assumed.
3. Exercise 3.3.1. Do parts a,b,c,d,e,f, but do only step
ii
.