2
votes

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.

2

2 Answers

0
votes

Relation 1: (Y,C,D) Relation 2: (D,X)

0
votes

@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)