无损分解与依存关系 [英] Lossless decomposition vs Dependency Preservation

查看:183
本文介绍了无损分解与依存关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它们中的任何一个都暗示着另一个吗?

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?

推荐答案

通常,这是两个独立的东西:您可以无损地分解 依存关系的保留,以及保留依存关系的分解,但是不是无损的。

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:


让ρ= {R(T i ,F i )}对关系模式R(T,F)的分解,它保留了相关性。如果对于某些j,T j 是R(T,F)的超键,则分解ρ是无损的。

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.

实际上,此属性在分解3NF中的关系的合成算法的最后一步中应用:如果在先前步骤中获得的模式没有包含原始关系的超键,则添加一个新模式

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.

这可以保证算法产生的分解既无损又保留了相关性,而另一方面已知在某些情况下,用于分解BCNF中的关系的分析算法可能会导致功能依赖项的丢失。

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.

这篇关于无损分解与依存关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆