non trivial functional dependency in DBMS

vashu picture vashu · Apr 10, 2014 · Viewed 28.2k times · Source

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,,

Answer

Mike Sherrill 'Cat Recall' picture Mike Sherrill 'Cat Recall' · Apr 10, 2014

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.

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.

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.

Repeat for every possible combination of attributes.