Reputation: 21
i have the following table
Case ( referenceID, startDate, endDate, caseDetail, caseType, caseTypeRate,
lawyerName, lawyerContact, clientID, clientName, clientAddress, clientContact,
serviceProvided, serviceDate, serviceCost,
otherPartyID, otherPartyName, otherPartyContact )
my FDs are
referenceID-->caseDetail
referenceID-->caseType
referenceID-->ServiceProvided
lawyerContact-->lawayerName
clientID-->clientName
am i correct or are there more? i'm still a bit unsure of how it works after reading the theory. i need clear examples. how do i determine the mvds as well?
Upvotes: 1
Views: 9568
Reputation: 9
Here is a good example of how to determine a MVD: https://web.archive.org/web/20140212170321/https://www.cs.oberlin.edu/~jdonalds/311/lecture08.html.
Basically, follow this algorithm:
1) Figure out if A determines a set of values for B, 2) Figure out if A determines a set of values for C, and then 3) Determine if B and C are independent of each other.
A, B, C are a set of attributes. If the conditions are satisfied then A -->> B and A -->> C are MVDs.
Upvotes: 0
Reputation: 49
Functional dependency:-If one value for X there is only one value of Y then we can say that Y is functionaly dependent upon X and written as follow.
X -> Y
Multivalue dependecy:-If for one value of X there are more than one values of Y then we can say that Y is multivalue dependency upon X and it is written as followes.
X ->-> Y
Upvotes: 4
Reputation: 95532
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.
Upvotes: 4