a3ans - Model Answers for Assignment 3 Each exercise is...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
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 .
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
SOLUTION (a) Given R(A,B,C,D) and FDs AB → C, C → D, and D → A. We already determined in Exercise 3.2.1 that the keys for this relation are AB, BD and BD. Checking the FDs, we see that C → D violates the BCNF condition; C is not a superkey. Decompose R into two relations: First we take the closure of {C} and make
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

a3ans - Model Answers for Assignment 3 Each exercise is...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online