What is the BCNF decomposition for these dependencies?
A->BCD
BC->DE
B->D
D->A
What is the process to get to the answer?
What is the BCNF decomposition for these dependencies?
A->BCD
BC->DE
B->D
D->A
What is the process to get to the answer?
We can first convert the relation R
to 3NF and then to BCNF.
To convert a relation R
and a set of functional dependencies(FD's
) into 3NF
you can use Bernstein's Synthesis. To apply Bernstein's Synthesis -
FD's
is a minimal coverFD
and make it its own sub-schema.For example in your case:
R = {A,B,C,D,E}
FD's = {A->BCD,BC->DE,B->D,D->A}
First we check whether the FD's
is a minimal cover (singleton right-hand side , no extraneous left-hand side attribute, no redundant FD)
C
from FD BC->D
and BC->E
. So now we have FD's as {A->B, A->C, A->D, B->D, B->E, B->D, D->A}Second we make each FD
its own sub-schema. So now we have - (the keys for each relation are in bold)
R1={A,B}
R2={A,C}
R3={B,D}
R4={B,E}
R5={D,A}
Third we see if any of the sub-schemas can be combined. We see that R1 and R2 have the LHS so they can be combined. Similarly R3 and R4 can be combined. So now we have -
S1 = {A,B,C}
S2 = {B,D,E}
S3 = {D,A}
This is in 3NF. Now to check for BCNF we check if any of these relations (S1,S2,S3) violate the conditions of BCNF (i.e. for every functional dependency X->Y
the left hand side (X
) has to be a superkey) . In this case none of these violate BCNF and hence it is also decomposed to BCNF.