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

I tried to contact my instructor without any luck, and I really want to understand this process, but no matter how much I read this material, I can not seem to fit into my little brain. Can someone please help me with the following questions?

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

a. Calculate B +.

I think so. Is it correct?

B + denotes closure B.
B β†’ D
B + = {BD}
D β†’ A
B + = {ABD}
A β†’ BCD
B + = {ABCD}
BC β†’ DE
B + = {ABCDE}

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

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

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

with. Calculate the canonical coverage for the specified set of functional dependencies F; Give each step of your output an explanation.

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

+4
source share
3 answers

All relationship attributes can be found in B. So, B is the main key of the relationship.

No. If B can define all the attributes of a relation, B will be a candidate key. There may be more than one candidate key, and there is no official reason to identify one candidate key as β€œprimary” and the other as β€œsecondary”.

But B does not define all the attributes of the relation. He does not define F.

I do not understand what to do with F because it does not appear in the above relationship.

Speaking informally, if an attribute is not displayed on the right side of any functional dependencies, it should be part of each superkey.

 r = {ABCDEF} 

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

+1
source

Part C: canonical cover

 A->BCD, BC->DE, B->D, D->A 
  • Remove D from BC-> DE

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

  • Remove D from A-> BCD

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

  • Expand A-> BC

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

  • Remove C from BC-> E

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

+1
source

1, reducing each FD to a single att on the right:

A-> B A-> C AD BC β†’ D BC β†’ E B-> D D-> A

2 removal of external atts:

BC β†’ D reduces to B-> D and BC β†’ E reduces to B-> E, since C is extraneous in both.

3 removal of excess FDs:

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

Someone will post my answer if I am wrong.

0
source

Source: https://habr.com/ru/post/1340445/


All Articles