Consider the following set F of functional dependencies on the relation schema r(A,B,C,D,E,F):

Sam picture Sam · Feb 19, 2011 · Viewed 14.9k times · Source

I have tried to reach out to my instructor with no luck and I really want to understand this process, but no matter how much I read the material I cannot seem to make this fit in my little brain. Can someone please help me with the following questions?

A-->BCD
BC-->DE
B-->D
D-->A

a. Compute B+.

I believe that this one is as follows. Does this seem to be correct?

B+ denotes closure of B.
B --> D
B+ = {BD}
D --> A
B+ = {ABD}
A --> BCD
B+ = {ABCD}
BC --> DE
B+ = {ABCDE}

All the attributes of the relation can be found by B. So, B is the primary key of the relation.

b. Prove (using Armstrong’s axioms) that AF is a superkey.

I do not understand what to do with F, because it does not show up in the above relationships.

c. Compute a canonical cover for the above set of functional dependencies F; give each step of your derivation with an explanation.

d. Give a 3NF decomposition of r based on the canonical cover.

Answer

All the attributes of the relation can be found by B. So, B is the primary key of the relation.

No. If B could determine all the attributes of the relation, B would be a candidate key. There might be more than one candidate key, and there's no formal reason to identify one candidate key as "primary" and others as "secondary".

But B doesn't determine all the attributes of the relation. It doesn't determine F.

I do not understand what to do with F, because it does not show up in the above relationships.

Speaking informally, if an attribute doesn't show up on the right-hand side of any functional dependencies, it has to be a part of every superkey.

r = {ABCDEF}

To prove that AF is a superkey (or candidate key), compute the closure of AF for the relation R = {ABCDEF}. Use the same FDs above.