databaserelational-databasefunctional-dependencies

Non trivial functional dependency in DBMS


What are the non-trivial functional dependencies in the following table?

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

What the basic concept?


Solution

  • 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.