Lossless decomposition vs Dependency Preservation

北城以北 提交于 2019-12-10 09:37:50

问题


Does anyone of them implies the other?

My logic is that if all dependencies are preserved, then there is no loss of information and similarly, if decomposition is lossless then no functional dependency must have been violated.

So essentially, dependency preservation is a way to ensure that your decomposition is lossless.

I am having a hard time accepting/denying it. So do both of these guarantee one another or are there cases where one can be achieved without the other?


回答1:


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.



来源:https://stackoverflow.com/questions/39464758/lossless-decomposition-vs-dependency-preservation

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