4

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.

Community
  • 1
  • 1
Sam
  • 41
  • 1
  • 1
  • 3

3 Answers3

1

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

1

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.

Mike Sherrill 'Cat Recall'
  • 91,602
  • 17
  • 122
  • 185
  • Since the closure of AF gives all the possible attributes, is this sufficient proof that AF is a superkey ? @MikeSherrill'Cat Recall' – Jarvis Mar 30 '17 at 13:12
  • 1
    @Jarvis: Loosely speaking, that's pretty much the definition of *superkey*. A superkey uniquely identifies a tuple. So every superkey will "give all the possible attributes", in the sense that the superkey functionally determines all attributes that aren't part of the superkey. – Mike Sherrill 'Cat Recall' Mar 30 '17 at 23:03
0

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.

Community
  • 1
  • 1