列出功能依赖性-包括传递值还是多值? [英] Listing functional dependencies - include transitive or multivalued?

查看:91
本文介绍了列出功能依赖性-包括传递值还是多值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对数据库/ SQL还是很陌生,并且有一个实践问题上面显示的功能依赖项是什么?



据我了解,有4个依赖项:琐碎的功能,完整的功能,可传递的和多值的。



问题是希望所有四种类型都被列出还是只列出前两种?



如果只有前两个,那么它们是否有一个特殊的名称,或者它们是依赖项,而列表中的前两个是功能依赖项呢?



非常感谢

解决方案

有多种依赖关系。最常见的是在规范化中起作用的函数,它是多值的和联接的。



对于这三种类型中的每一种,依赖都可能是微不足道的。

>

您被要求提供FD。 FD,MVD和JD是三件事。 (尽管FD具有关联的MVD,而MVD具有关联的JD。)



依赖性可以在给定的表值中保留或不保留。它也可以在一个给定的表变量中保留或不保留,这意味着在给定业务规则的情况下,该变量可能分别存在或不存在。



当FD的确定集是其确定集的子集时,FD显得微不足道。您可以使用关系的属性在其中保留的任何琐碎FD。



在关系中保留的部分FD是在其中删除任何确定的属性可以得到另一个FD在这种关系中。



关系中拥有的传递FD X-> Z是其中存在属性Y的一个。关系中X-> Y和Y-> Z成立,但Y-> X不成立。在关系中不具有可传递性的FD是非传递性的。因此,当要求列出所有FD时,按那种类型列出它们是没有意义的。



在您的作业中,显示表示显示为持有。您需要询问您的讲师给定示例表值应列出哪些FD。也许您应该只列出明确传达给持有的FD,因为它们具有一些确定的子元组,并且仅与相同的确定子元组一起出现。考虑到明确的FD,也许您应该列出所有持有的FD。也许是其中一种情况,只是您不应该列出琐事。


I'm quite new to databases / SQL and have a practice question "what are the functional dependencies shown above?"

From what I understand there are 4 dependencies: trivial functional, full functional, transitive and multivalued.

Would the question be expecting all four types to be listed or only the first two?

If only the first two then is there a special name for them or are they 'dependencies' whereas the first two in the list are functional dependencies?

Many thanks

解决方案

There are various kinds of dependencies. The most common, which play a role in normalization, are functional, multi-valued and join.

For each of those three kinds a dependency can be trivial.

You were asked for FDs. FDs, MVDs & JDs are three different things. (Although an FD has an associated MVD and an MVD has an associated JD.)

A dependency can hold or not hold in a given table value. It can also hold or not hold in a given table variable, which means that it holds or does not hold (respectively) in every value that can arise for the variable given the business rules.

A FD is trivial when its determined set is a subset of its determing set. Any trivial FD you can make using the attributes of a relation holds in it.

A partial FD that holds in a relation is one where dropping any determining attributes can give another FD that holds in that relation. The FDs that hold in a relation that are not partial are full.

A transitive FD X -> Z that holds in a relation is one where there is an attribute Y in the relation where X -> Y and Y -> Z hold in the relation but Y -> X does not hold. The FDs that hold in a relation that are not transitive are non-transitive.

An FD that holds can be zero or more of trivial, full and/or transitive independently. So when asked to list all FDs it doesn't make sense to list them by those kinds.

In your assignment "shown" means "shown to hold". You need to ask your instructor what FDs you are supposed to list given an example table value. Maybe you are supposed to list only the FDs that are explictly communicated to hold by having some determined subtuple only appear with the same determining subtuple. Maybe you are supposed to list all the FDs that hold given that the explicit ones do. Maybe it's one of those cases except you are not supposed to list the trivai ones.

这篇关于列出功能依赖性-包括传递值还是多值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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