Exercise 7.2 Answer: A Decomposition (R
Exercise 7.2 Answer: A Decomposition (R
Exercise 7.4
Exercise 7.6
Exercise 7.11
Therefore, any functional dependency with A, E, BC, or CD on the left hand side of the
arrow is in F+, no matter which other attributes appear in the FD.
Allow * to represent any set of attributes in R, then F+ is BD → B, BD → D, C → C,
D → D, BD → BD, B → D, B → B, B → BD, and all FDs of the form A∗ → α,
BC ∗ → α, CD∗ → α, E∗ → α where α is any subset of {A, B, C, D, E}.
Exercise 7.12
Answer: Computing B+ by the algorithm in Figure 7.7 we start with result = {B}.
Considering FDs of the form β → γ in F, we find that the only dependencies
satisfying β ⊆ result are B → B and B → D. Therefore result = {B, D}. No
more dependencies in F apply now. Therefore B+ = {B, D}
I took both answers as correct as long as you explain your answer. Please do not use one
simple word “YES” or “NO” for your answer.
Show that the following decomposition of the schema in Exercise 7.2 is not a
lossless-join decomposition: (A, B, C) and (C, D, E).
Answer : From Exercise 7.11, we know that B → D is nontrivial and the left hand side is
not a superkey. By the algorithm of Figure 7.13 we derive the relations {(A, B, C, E),
(B, D)}. This is in BCNF.
You may have other decompositions as long as it is in BCNF.
Answer:
1. A->ABCD, B->ABCD, C->ABCD, D->ABCD
Thus, candidate keys are A,B,C,D
Since all are candidate keys, there is NO BCNF Nor 3NF violations. No
decomposition necessary.
2. AB->ABCD.
Thus, AB is candidate key.
B->C, B-D both violate BCNF
– Since the closure of B (B+) does NOT include all R’s attributes.
– B+ = {B,C,D}
One possible BCNF decomposition is {(A,B),(B,C,D)}