database DBMS 中的非平凡函数依赖

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22992299/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 09:13:33  来源:igfitidea点击:

non trivial functional dependency in DBMS

databaserelational-databasefunctional-dependencies

提问by vashu

pls help me to find out non trivial functional dependency in a following table?

请帮助我在下表中找出重要的函数依赖关系?

A.            B.              C
1             1               1
1             1               0
2             3               2
2             3               2

and also explain the basic concept behind it. thank you,,

并解释其背后的基本概念。谢谢你,,

回答by user4280884

Trivial: If an FD X → Y holds where Y subset of X, then it is called a trivial FD. Trivial FDs are always hold.

平凡的:如果一个 FD X → Y 包含 X 的 Y 子集,那么它被称为平凡的 FD。琐碎的 FD 始终保持。

Non-trivial: If an FD X → Y holds where Y is not subset of X, then it is called non-trivial FD.

非平凡:如果一个 FD X → Y 成立,其中 Y 不是 X 的子集,那么它被称为非平凡 FD。

Completely non-trivial: If an FD X → Y holds where x intersect Y = Φ, is said to be completely non-trivial FD.

完全非平凡:如果 FD X → Y 在 x 与 Y = Φ 相交的地方成立,则称其为完全非平凡的 FD。

For example:

例如:

X = { b, c } and Y = { b, a }. If X → Y, then the FD is non-trivial but not completely non-trivial.

X = { b, c } 和 Y = { b, a }。如果 X → Y,则 FD 是非平凡但并非完全非平凡。

回答by Mike Sherrill 'Cat Recall'

A functional dependency answers the question, "Given one value for X, do I find one and only one value for Y?" Both X and Y are sets; each one represents one or more attributes.

函数依赖回答了这样一个问题:“给定 X 的一个值,我是否只能找到一个 Y 值?” X 和 Y 都是集合;每一个代表一个或多个属性。

So we can ask ourselves, "Given one value for 'A', do I find one and only one value for 'B'?" And the answer is "Yes". (Assuming the sample data is representative.) That leads to the nontrivial functional dependency A->B.

所以我们可以问自己,“给定 'A' 的一个值,我能找到一个且只有一个值的 'B' 吗?答案是“是”。(假设样本数据具有代表性。)这导致了非平凡的函数依赖 A->B。

And we continue with the question, "Given one value for 'A', do I find one and only one value for 'C'?" And the answer is "No". Given 1 for 'A', we find two different values for 'C': 1 and 0. No functional dependency there.

我们继续回答这个问题,“给定 'A' 的一个值,我能找到一个且只有一个值的 'C' 吗?” 答案是“不”。给定 'A' 的 1,我们发现 'C' 的两个不同值:1 和 0。那里没有函数依赖。

Repeat for every possible combination of attributes.

对每种可能的属性组合重复此操作。

回答by user4831712

non trivial dependency means X-->Y that is if Y is not proper subset of X table or relation with X then it said to be non trivial functional dependency.

非平凡依赖意味着 X-->Y 即如果 Y 不是 X 表的真子集或与 X 的关系,那么它被称为非平凡函数依赖。

回答by kayakpim

See the examples here: http://en.wikipedia.org/wiki/Functional_dependency

请参阅此处的示例:http: //en.wikipedia.org/wiki/Functional_dependency

Especially the lecture one. I think in this case (for the data set you show) for instance if A=1 B=2 and if A=2 B=3. That is probably the dependency you are talking about.

尤其是讲座一。我认为在这种情况下(对于您显示的数据集),例如如果 A=1 B=2 并且如果 A=2 B=3。这可能就是你所说的依赖。

回答by Dharmendra Verma

Trivial fd: x,y some attributes sets, if y is a subset of x then x->y implies is a trivial fd.

平凡的 fd:x,y 一些属性集,如果 y 是 x 的子集,那么 x->y 意味着是一个平凡的 fd。

Non-trivial fd; x,y some attributes sets , if x intersection y goes to phi. then x->

非平凡的 fd;x,y 设置一些属性,如果 x 交点 y 变为 phi。然后 x->