Normalisation into BCNF

大憨熊 提交于 2020-01-13 19:42:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!