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

23.1k views Asked by At

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.

3

There are 3 answers

0
Yasas Senarath On

Part C: canonical cover

A->BCD, BC->DE, B->D, D->A
  1. Remove D from BC->DE

    A->BCD, BC->E, B->D, D->A

  2. Remove D from A->BCD

    A->BC, BC->E, B->D, D->A

  3. Decompose A->BC

    A->B, A->C, BC->E, B->D, D->A

  4. Remove C from BC->E

    ? : B->D->A->C => B->C => B->BC->E => B->E ? : B+:: B->BD->ABD->ABCD->ABCDE (E is an element of B+) A->B, A->C, B->E, B->D, D->A

2
Mike Sherrill 'Cat Recall' On

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.

1
sarwateashwin On

1 reducing each FD to single att on right:

A->B A->C A-D BC -> D BC -> E B->D D->A

2 removing extraneous atts:

BC -> D is reduced to B->D and BC -> E is reduced to B->E since C is extraneous in both.

3 removing redundant FDs:

A->B, A->C, B->D, B->E, D->A

Somebody pl correct my answer if I'm wrong.