《数据库系统原理教学课件》作业讲评4nf的判定.ppt
4NF的判定的判定1lR=(U,F)lU=n,s,b,cn,cs,cb,as,amlF=sn,sb,cscn,cscb,ass,asaml 1=(s,n,b),(cs,cn,cb),(as,s,am)l 1保持函数依赖并且满足保持函数依赖并且满足4NFl 1不能够无损连接得到不能够无损连接得到R,丢失了,丢失了s与与cs之间的亲子关系之间的亲子关系2lR=(U,F)lU=n,s,b,cn,cs,cb,as,amlF=sn,sb,cscn,cscb,ass,asamlKEY=cs,as3 U=n,s,b,cn,cs,cb,as,am F=sn,sb,cscn,cscb,ass,asam KEY=cs,as计算计算:(s)F+=s,n,bR1满足满足4NFR只满足只满足1NF“X”“X”“A”U=s,cn,cs,cb,as,am KEY=cs,asF=cscn,cscb,ass,asam U去掉去掉“A”(s,cn,cs,cb,as,am)U1=s,n,bKEY=s“XA”F1=sn,sb4 U=s,cn,cs,cb,as,am F=cscn,cscb,ass,asam KEY=cs,as计算计算:(cs)F+=cs,cn,cbR2满足满足4NFR”只满足只满足1NF“X”“X”“A”U”=s,cs,as,am KEY=cs,as F”=ass,asam U去掉去掉“A”(s,cs,as,am)U2=cs,cn,cbKEY=cs“XA”F2=cscn,cscb5 U”=s,cs,as,am F”=ass,asam KEY=cs,as计算计算:(as)F+=as,s,amR3满足满足4NFR4满足满足4NF“X”“X”“A”U4=cs,asKEY=cs,as F4=U去掉去掉“A”(cs,as)U3=as,s,amKEY=as“XA”F3=ass,asam6lR=(U,F)lU=n,s,b,cn,cs,cb,as,amlF=sn,sb,cscn,cscb,ass,asamlKEY=cs,asl 2=(s,n,b),(cs,cn,cb),(as,s,am),(cs,as)l 2无损连接并且保持函数依赖无损连接并且保持函数依赖l 2满足满足4NF7lR=(U,F)lU=n,s,b,cn,cs,cb,as,amlF=sn,sb,cscn,cscb,ass,asamlKEY=cs,asl 3=(s,n,b),(as,s,am),(s,cs)l 3从实体联系的语义出发进行分解从实体联系的语义出发进行分解l 3满足满足4NF83.6.3.alR(A,B,C,D)lF=lMVD=AB,ACl=D不属于任一多值依赖不属于任一多值依赖lKEY=ABCDlR最高满足最高满足BCNF93.6.3.alR(A,B,C,D)lF=lMVD=AB,AClKEY=ABCDl=ABD,ACD,满足满足4NFlR3(AB)=ABR1(ABD)=ABR(ABCD)lR4(AC)=ACR2(ACD)=ACR(ABCD)103.6.3.blR(A,B,C,D)lF=lMVD=AB,BCD=ACDlKEY=ABCDlR最高满足最高满足BCNFl=AB,BCD,ACDl 满足满足4NF113.6.3.clR(A,B,C,D)lF=BClMVD=ABC=ABDlKEY=ABDlR只满足只满足1NF123.6.3.clR(A,B,C,D)lF=BC KEY=ABDlMVD=ABC=ABDl=ABC,ABD=A,BC,ABD l =AB,BC,ABDlR1(AB)=ABR3(ABD)=ABR(ABCD)l=BC,ABDl 满足满足4NF,保持函数依赖,无损,保持函数依赖,无损133.6.3.clR(A,B,C,D)lF=BC KEY=ABDlMVD=ABC=ABDl保持函数依赖进行模式分解保持函数依赖进行模式分解l=BC,ABDl 满足满足4NF,保持函数依赖,无损,保持函数依赖,无损143.6.3.dlR(A,B,C,D,E)lF=AD,ABElMVD=AB,ACl=D,E不属于任一多值依赖不属于任一多值依赖lKEY=ABClR最高满足最高满足1NF153.6.3.dlR(A,B,C,D,E)lF=AD,ABElMVD=AB,AClKEY=ABCl=AB,AC,AD,ABElR1(AB)=ABR4(ABD)=ABR(ABCD)l=AC,AD,ABEl 满足满足4NF,保持函数依赖,有损,保持函数依赖,有损16