1

我有下表

Case ( referenceID, startDate, endDate, caseDetail, caseType, caseTypeRate, 
    lawyerName, lawyerContact, clientID, clientName, clientAddress, clientContact,
    serviceProvided, serviceDate, serviceCost,
    otherPartyID, otherPartyName, otherPartyContact )

我的 FD 是

 referenceID-->caseDetail
 referenceID-->caseType
 referenceID-->ServiceProvided
 lawyerContact-->lawayerName
 clientID-->clientName  

我是正确的还是还有更多?在阅读了理论之后,我仍然有点不确定它是如何工作的。我需要清楚的例子。我如何确定 mvds 以及?

4

3 回答 3

4

Loosely speaking, a functional dependency expressed as x -> y means, "When I know any value of x, I know one and only one value of y." So the value of x determines one and only one value of y.

To determine whether a functional dependency exists, you ask yourself the question, "If I know any value for x, do I know one and only one value for y?", and then answer it.

In your case, I'd guess that most of these additional functional dependencies will hold. It's hard to tell for sure, since there's no sample data, and since I don't know what the columns mean. (Trying to determine functional dependencies based solely on column names is very risky. Here, "startDate" could mean just about anything.)

referenceID -> startDate
referenceID -> endDate
referenceID -> caseType
referenceID -> caseTypeRate
clientID -> clientName
clientID -> clientAddress
clientID -> clientContact
otherPartyID -> otherPartyName
otherPartyID -> otherPartyContact

There are others.

Wikipedia has a concise example of a multi-valued dependency.

于 2012-08-24T05:57:55.017 回答
4

功能依赖:-如果 X 的一个值只有一个 Y 值,那么我们可以说 Y 在功能上依赖于 X,并写如下。

X -> Y

多值依赖:-如果对于 X 的一个值有多个 Y 值,那么我们可以说 Y 是对 X 的多值依赖,它写成如下。

X ->-> Y
于 2012-08-31T14:04:58.477 回答
1

这是如何确定 MVD 的一个很好的示例:https ://web.archive.org/web/20140212170321/https://www.cs.oberlin.edu/~jdonalds/311/lecture08.html 。

基本上,遵循这个算法:

1) 判断 A 是否确定了 B 的一组值,2) 判断 A 是否确定了 C 的一组值,然后 3) 确定 B 和 C 是否相互独立。

A、B、C 是一组属性。如果满足条件,则 A -->> B 和 A -->> C 是 MVD。

于 2015-02-15T01:06:49.817 回答