问题
I have a relation looks like:
R = (X,Y,C,D)
and functional dependencies:
FD = {XY -> CD, YC -> D, D -> X}
I found out that the candidate keys are XY, YC, YD.
In this case, I have 3 candidate keys... so how do I use them when I decompose the relation into BCNF? I've never done decomposition of the relation with more than one key...
Thanks.
回答1:
Relation 1: (Y,C,D) Relation 2: (D,X)
回答2:
@KeyM
1.Find out the FD that violates BCNF
In this case its D->X
2.Decompose into two relations R1,R2
R1(D,X) R2(D,rest)
3. Repeat 1,2 until all of the relations are in BCNF
Using this our solution is R1(Y,C,D) , R2(D,X)
来源:https://stackoverflow.com/questions/13286510/normalisation-into-bcnf