Lossless decomposition vs Dependency Preservation

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 03:06:09

In general these are two independent things: you can have a lossless decomposition without dependency preservation, as well as a decomposition that preserves the dependencies but that is not lossless.

So, the answer to your first question is no, none of them implies the other.

However, these two properties can be “connected” by the following basic result, that gives a sufficient (even if not necessary) condition to establish if a dependency preserving decomposition is also lossless:

Let ρ = {R(Ti,Fi)} a decomposition of a relation schema R(T,F) that preserves the dependencies. If, for some j, Tj is a superkey of R(T,F), then the decomposition ρ is lossless.

Actually, this property is applied in the last step of the “synthesis” algorithm that decompose a relation in 3NF: if no schema obtained in the previous steps contains a superkey of the original relation, then add a new schema with any candidate key of the original relation.

This guarantees that the algorithm produces a decomposition which is both lossless and preserves the dependencies, while, on the other hand, it is known that the “analysis” algorithm to decompose a relation in BCNF can produce, in some cases, the loss of functional dependencies.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!