《《数据库系统原理教学课件》作业讲评4nf的判定.ppt》由会员分享,可在线阅读,更多相关《《数据库系统原理教学课件》作业讲评4nf的判定.ppt(16页珍藏版)》请在三一办公上搜索。
1、1,4NF的判定,2,R=(U,F)U=n,s,b,cn,cs,cb,as,amF=sn,sb,cscn,cscb,ass,asam1=(s,n,b),(cs,cn,cb),(as,s,am)1保持函数依赖并且满足4NF1不能够无损连接得到R,丢失了s与cs之间的亲子关系,3,R=(U,F)U=n,s,b,cn,cs,cb,as,amF=sn,sb,cscn,cscb,ass,asamKEY=cs,as,4,U=n,s,b,cn,cs,cb,as,am F=sn,sb,cscn,cscb,ass,asam KEY=cs,as,计算:(s)F+=s,n,b,R1满足4NF,R只满足1NF,5,U
2、=s,cn,cs,cb,as,am F=cscn,cscb,ass,asam KEY=cs,as,计算:(cs)F+=cs,cn,cb,R2满足4NF,R”只满足1NF,6,U”=s,cs,as,am F”=ass,asam KEY=cs,as,计算:(as)F+=as,s,am,R3满足4NF,R4满足4NF,7,R=(U,F)U=n,s,b,cn,cs,cb,as,amF=sn,sb,cscn,cscb,ass,asamKEY=cs,as2=(s,n,b),(cs,cn,cb),(as,s,am),(cs,as)2无损连接并且保持函数依赖2满足4NF,8,R=(U,F)U=n,s,b,cn
3、,cs,cb,as,amF=sn,sb,cscn,cscb,ass,asamKEY=cs,as3=(s,n,b),(as,s,am),(s,cs)3从实体联系的语义出发进行分解3满足4NF,9,3.6.3.a,R(A,B,C,D)F=MVD=AB,AC=D不属于任一多值依赖KEY=ABCDR最高满足BCNF,10,3.6.3.a,R(A,B,C,D)F=MVD=AB,ACKEY=ABCD=ABD,ACD,满足4NFR3(AB)=ABR1(ABD)=ABR(ABCD)R4(AC)=ACR2(ACD)=ACR(ABCD),11,3.6.3.b,R(A,B,C,D)F=MVD=AB,BCD=ACDK
4、EY=ABCDR最高满足BCNF=AB,BCD,ACD满足4NF,12,3.6.3.c,R(A,B,C,D)F=BCMVD=ABC=ABDKEY=ABDR只满足1NF,13,3.6.3.c,R(A,B,C,D)F=BC KEY=ABDMVD=ABC=ABD=ABC,ABD=A,BC,ABD=AB,BC,ABDR1(AB)=ABR3(ABD)=ABR(ABCD)=BC,ABD满足4NF,保持函数依赖,无损,14,3.6.3.c,R(A,B,C,D)F=BC KEY=ABDMVD=ABC=ABD保持函数依赖进行模式分解=BC,ABD满足4NF,保持函数依赖,无损,15,3.6.3.d,R(A,B,C,D,E)F=AD,ABEMVD=AB,AC=D,E不属于任一多值依赖KEY=ABCR最高满足1NF,16,3.6.3.d,R(A,B,C,D,E)F=AD,ABEMVD=AB,ACKEY=ABC=AB,AC,AD,ABER1(AB)=ABR4(ABD)=ABR(ABCD)=AC,AD,ABE满足4NF,保持函数依赖,有损,