R(A,B,C,D)和函数依赖AB→C,C→D和D→A.
找出违反BCNF的依赖(不必找出右边多于一个属性的),并将其分解成BCNF关系的聚集.
首先我找出了非平凡依赖:
C→A,C→D,D→A,AB→D,AB→C,AC→D,BC→A,BC→D,BD→A,BD→C,CD→A,ABC→D,ABD→C和BCD→A.违反BCNF的有:
C→A,C→D,D→A,AC→D,CD→A.然后就是分解了标准答案给的是AC,BC,CD
请各位帮忙教我最后的分解 是怎么做的.

解决方案 »

  1.   

    R1=CD(C→D;R1 is in BCNF)
    R2=CAB(C→A,AB→C; C is not a key so R2 is not in BCNF)
    R21=CA,R22=CB
      

  2.   

    One choice is to decompose using C->D. That gives us ABC and CD as decomposed relations. CD is surely in BCNF, since any two-attribute relation is. ABC is not in BCNF, since AB and BC are its only keys, but C->A is a dependency that holds in ABCD and therefore holds in ABC. We must further decompose ABC into AC and BC. Thus, the three relations of the decomposition are AC, BC, and CD.