数据库chapter6课件讲解.ppt

  1. 1、本文档共82页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Step3. With respect to R2(CTHRS) the restriction of F to R2(CTHRS) is F2={C ?T, TH ?R, HR ?C, HS ?R} the candidate key is HS R2 (CTHRS) is not in BCNF, because there is C ?T in F2, and C is not the candidate key of R2 R2(CTHRS) is decomposed into R21(CT) and R22(CHRS) R21(CT) is in BCNF , F21= {C ?T} Step4. With respect to R22(CHRS) the restriction of F to R22(CHRS) is F22={HR ?C, HS ?R, CH ? R} /* CH ?TH, TH ?R the candidate key is HS R22(CHRS) is not in BCNF, because there is HR ?C in F22, and HR is not candidate key of R22 R22(CHRS) is decomposed into R221(HRC) and R222(HRS) R221(HRC) is in BCNF Step5. With respect to R222(HRS), the restriction of F to R222(HRS) is F222={HS ?R}, and the candidate key is HS R222(HRS) is in BCNF Finally, the BCNF decomposition of R(C, T, H, R, S, G) is R1(CSG) , R21(CT) , R221(HRC) , R222(HRS) Testing for BCNF To check if a non-trivial dependency ???? causes a violation of BCNF 1. compute ?+ (the attribute closure of ?), and 2. verify that it includes all attributes of R, that is, it is a superkey of R. Simplified test: To check if a relation schema R is in BCNF, it suffices to check only the dependencies in the given set F for violation of BCNF, rather than checking all dependencies in F+. If none of the dependencies in F causes a violation of BCNF, then none of the dependencies in F+ will cause a violation of BCNF either. DataBase System Concepts However, using only F is incorrect when testing a relation in a decomposition of R Consider R = (A, B, C, D, E), with F = { A ? B, BC ? D} Decompose R into R1 = (A,B) and R2 = (A,C,D, E) Neither of the dependencies in F contain only attributes from (A,C,D,E) so we might be mislead into thinking R2 satisfies BCNF. In fact, dependency AC ? D in F+ shows R2 is not in BCNF. DataBase System Concepts To check if a relation Ri in a decomposition of R is in BCNF, use the original set of dependencies F that hold on R, but with the following test: for ev

文档评论(0)

shuwkb + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档