0

How to calculate candidate key from functional dependency ?

The Relation R(ABCDEF) with FD set F= AB ->CDEF, C-> A, D->B, C-> D, E ->F, B->E) How to find The number of candidate keys of a relation R

13th Sep 2019, 8:03 PM
Preity
Preity - avatar
4 Réponses
+ 10
Preity Look first we need to know what are the prime attribute means part of the candidate key AB is an prime attribute CD is an prime attribute So we can say ABCD all have prime attribute so we can make one candidate key with define new relation with ABCD as an candidate key as it retrieve all attribute R1(ABCD) B->BEF is in transitive dependency so we make B an leader of table by making separate candidate key so that can be in 3NF form R2(B->BEF) Third E->F an non prime attribute generating other non prime attribute so that is in transitive dependency so we have to again make this key as an candidate key as an leader R3(E->F) This way we have 3 candidates key [1/2]
14th Sep 2019, 7:11 AM
GAWEN STEASY
GAWEN STEASY - avatar
+ 10
among all fd ...candidate keys are AB,CD,CB,AD...hence prime attributes are (A,B,C,D) now look out for FD ...the one which breaks 3nf rule will be split as table..... AB->CDEF......(left side is superkey ..so left it as it is) C->A  in 3nf as right side is prime attribute... D->B in 3nf as B is prime attribute. B->E breaks 3nf ...so take closure of B.... (B)^+=BEF.... but again E->F breaks 3nf so separate it ....hence tables will be BE and EF.....now to have lossless decomposition remaining attributes of table are kept in one more table...... remaining are A,B,C,D...... hence we have 3 tables candidate key ABCD,EF,BE.. I think only this way you can calculate for this question [2/2]
14th Sep 2019, 7:11 AM
GAWEN STEASY
GAWEN STEASY - avatar
+ 4
Why C to A and C also to D?
14th Sep 2019, 12:35 AM
Gordon
Gordon - avatar
+ 3
This sounds more like homework or am I missing something ???
14th Sep 2019, 7:39 AM
BroFar
BroFar - avatar