【正文】
C}+ = C, and {D}+ = D. Thus, there are no new dependencies.Now consider pairs of attributes: {AB}+ = ABCD, {AC}+ = AC, {AD}+ = ABCD, {BC}+ = ABCD, {BD}+ = BD, {CD}+ = ABCD. Thus the new dependencies are AB224。D, BD224。B, AC224。C, A224。C.For the triples of attributes, {BCD}+ = BCD, but the closures of the other sets are each ABCD. Thus, we get new dependencies ABC224。D, AD224。D.Now consider pairs of attributes: {AB}+ = ABCD, {AC}+ = ABCD, {AD}+ = ABCD, {BC}+ = BCD, {BD}+ = BCD, {CD}+ = CD. Thus the new dependencies are AB224。D, ABD224。D, BD224。A, AB224。A.For the triples of attributes, {ACD}+ = ACD, but the closures of the other sets are each ABCD. Thus, we get new dependencies ABC224。A, and BC224。 IDPossible keys: {ID} {xposition, yposition, zposition}The reason why the positions would be a key is no two molecules can occupy the same point.Exercise The superkeys are any subset that contains A1. Thus, there are 2(n1) such subsets, since each of the n1 attributes A2 through An may independently be chosen in or out.Exercise The superkeys are any subset that contains A1 or A2. There are 2(n1) such subsets when considering A1 and the n1 attributes A2 through An. There are 2(n2) such subsets when considering A2 and the n2 attributes A3 through An. We do not count A1 in these subsets because they are already counted in the first group of subsets. The total number of subsets is 2(n1) + 2(n2).Exercise The superkeys are any subset that contains {A1,A2} or {A3,A4}. There are 2(n2) such subsets when considering {A1,A2} and the n2 attributes A3 through An. There are 2(n2) – 2(n4) such subsets when considering {A3,A4} and attributes A5 through An along with the individual attributes A1 and A2. We get the 2(n4) term because we have to discard the subsets that contain the key {A1,A2} to avoid double counting. The total number of subsets is 2(n2) + 2(n2) – 2(n4).Exercise The superkeys are any subset that contains {A1,A2} or {A1,A3}. There are 2(n2) such subsets when considering {A1,A2} and the n2 attributes A3 through An. There are 2(n3) such subsets when considering {A1,A3} and the n3 attributes A4 through An We do not count A2 in these subsets because they are already counted in the first group of subsets. The total number of subsets is 2(n2) + 2(n3).Exercise We could try inference rules to deduce new dependencies until we are satisfied we have them all. A more systematic way is to consider the closures of all 15 nonempty sets of attributes. For the single attributes we have {A}+ = A, {B}+ = B, {C}+ = ACD, and {D}+ = AD. Thus, the only new dependency we get with a single attribute on the left is C224。 state Street address, city, state 224。 name Area code 224。 xvelocity, yvelocity, zvelocity xposition, yposition, zposition 224。D is nontrivial. {AD}+ = AD, so nothing new. {BC}+ = ABCD, so we get BC224。C. {CD}+ = ACD, giving CD224。A.Since {ABCD}+ = ABCD, we get no new dependencies.The collection of 11 new dependencies mentioned above are: C224。A, BC224。A, ABC224。C and A224。B, AC224。D and BD224。B.Since {ABCD}+ = ABCD, we get no new dependencies.The collection of 13 new dependencies mentioned above are: A224。D, AC224。C, BC224。C and ACD224。A and CD224。B and BCD224。A, CD224。B and BCD224。D, B224。B and D224。D, B224。B, D224。B, AC224。A, BC224。A, CD224。B and BCD224。C. Thus A1A2…AnC224。 B1B2…Bm. The C1C2…Ck also tell us that the closure of A1A2…AnC1C2…Ck contains D1D2…Dj. Thus, A1A2…AnC1C2…Ck224。C). A Social Security Number can also uniquely identify a person’s name (. A224。C and B224。 A where A is some attribute not in X+. However, if this were the case, then X+ would not be the closure of X. The closure of X would have to include A as well. This contradicts the fact that we were given the closure of X, X+. Therefore, it must be that (X+)+ = X+ or else X+ is not the closure of X.Exercise If all sets of attributes are closed, then there cannot be any nontrivial functional dependencies. Suppose A1A2...An224。C A224。DC224。A D224。DAC224。CBC224。CCD224。CACD224。BB224。DD224。B AC224。A BC224。A CD224。BBCD224。A}{A224。B}The additional sets of minimal bases are:{C224。B, A224。C, B224。A and AB224。A.Exercise We need to pute the closures of all subsets of {ABC}, although there is no need to think about the empty set or the set of all three attributes. Here are the calculations for the remaining six sets:{A}+=ABCDE{B}+=ABCDE{C}+=ABCDE{AB}+=ABCDE{AC}+=ABCDE{BC}+=ABCDEWe ignore D and E, so a basis for the resulting functional dependencies for ABC is: A224。DE. We want to use Armstrong’s Axioms to show that ABC224。E hold because they are trivial and follow the reflexivity property. Using the transitivity rule, we can derive the FD ABC224。DE and DE224。E. According to Algorithm , the closure should bee ABCDE. Taking the FD C224。E and augmenting both sides with attributes ABC we get the FD ABCD224。D, D224。D, BC224。C, CD224。A.We also learned that the three keys were AB, BC, and BD. Thus, any dependency above that does not have one of these pairs on the left is a BCNF violation. These are: C224。D, and CD224。C, B224。D, BD224。C, B224。C. Using the above FDs, we get BCD and AB as deposed relations. AB is surely in BCNF, since any twoattribute relation is. Using Algorithm to discover the projection of FDs on relation BCD, we discover that BCD is in BCNF since B is its only key and the projected FDs all have B on the left side. Thus the two relations of the deposition are AB and BCD.Exercise In the solution to Exercise (ii), we found that there are 12 nontrivial dependencies, including the four given ones and the eight derived ones. They are AB224。B, AB224。B, ABC224。A.We also found out that the keys are AB, AD, BC, and CD. Thus, any dependency above that does not have one of these pairs on the left is a BCNF violation. However, all of the FDs contain a key on the left so there are no BCNF violations.No deposition is necessary since all the FDs do not violate BCNF.Exercise In the solution to Exercise (iii), we found that there are 28 nontrivial dependencies, including the four given ones and the 24 derived ones. They are A224。A, A224。A, C224。C, AB224。D, AD224