Converting 3NF to BCNF when there is a circular dependency

前端 未结 1 963
醉酒成梦
醉酒成梦 2021-01-27 02:03

If we have a relational schema R(A, B, C, D), with the set of dependencies:

ABC -> D
D -> A

How is it possible to decompose R into BCNF r

相关标签:
1条回答
  • 2021-01-27 02:38

    That's right, one can always losslessly decompose to 3NF while preserving FDs but BCNF might not preserve them. Nevertheless it's a lossless decomposition: the components, if holding projections of the original, will join to the original. But whenever the original would have had a given value, the components should be projections of it. (If they're not, an error has been made, so we want the DBMS to constrain the components appropriately.) So it is necessary but sufficient to constrain the components to be projections of the original. ABC is trivially so (because it is a key). This leaves us needing to require that AD = ABCD PROJECT {DA}. We say that the components must satisfy that "equality dependency".

    0 讨论(0)
提交回复
热议问题