数据库课件lec10norm幻灯片.ppt

  1. 1、本文档共44页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
* * * * * * * * * * * * * * * * * * * * Dependency Preserving Decompositions (Contd.) Decomposition of R into X and Y is dependency preserving if (FX ? FY ) + = F +. Important to consider F + in this definition: ABC, A ? B, B ? C, C ? A, decomposed into AB and BC. Is this dependency preserving? Is C ? A preserved? note: F + contains F ? {A ? C, B ? A, C ? B}, so… FAB contains A ?B and B ? A; FBC contains B ? C and C ? B .So, (FAB ? FBC)+ contains C ? A Decomposition into BCNF Consider relation R with FDs F. If X ? Y violates BCNF, decompose R into R - Y and XY (guaranteed to be loss-less). Repeated application of this idea will give us a collection of relations that are in BCNF; lossless join decomposition, and guaranteed to terminate. e.g., CSJDPQV, key C, JP ? C, SD ? P, J ? S {contractid, supplierid, projectid, deptid, partid, qty, value} To deal with SD ? P, decompose into SDP, CSJDQV. To deal with J ? S, decompose CSJDQV into JS and CJDQV So we end up with: SDP, JS, and CJDQV Decomposition of CSJDPQV into SDP, JS, and CJDQV What if we do the decomposition by using the dependency J?S first? BCNF and Dependency Preservation In general, there may not be a dependency preserving decomposition into BCNF. decomposition of CSJDPQV into SDP, JS and CJDQV is not dependency preserving (w.r.t. the FDs JP ? C, SD ? P and J ? S). i.e., the dependency JP ? C can not be enforced without a join. However, it is a lossless join decomposition. In this case, adding JPC to the collection of relations gives us a dependency preserving decomposition. but JPC tuples are stored only for checking the FD. (Redundancy!) Third Normal Form (3NF) Relation R with FDs F is in 3NF if, for all X ? A in F+ A ? X (called a trivial FD), or X is a superkey of R, or A is part of some candidate key (not superkey!) for R. Minimality of a key is crucial in third condition above! If R is in BCNF, obviously in 3NF. If R is in 3NF, some redundancy is pos

文档评论(0)

开心农场 + 关注
实名认证
内容提供者

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

1亿VIP精品文档

相关文档