Search code examples
rdbmsfunctional-dependencies

How to find the type of functional dependencies?


I am learning the functional dependencies concept in IIT lectures. In that lecture they said there are three types of functional dependencies. They are

  1. Trivial functional dependency
  2. Augmented Functional dependency
  3. Transitive functional dependency

    I know how to find the functional dependency. But I don't know that functional dependency is which type.

Please explain with examples for the functional dependency types.


Solution

    1. Trivial functional dependency is easiest to understand.

    A functional dependency A1A2....An->B is said to be trivial if B is one of A’s.

    To make it non-trivial just remove from the right side of an FD those attributes that appear on the left. (trivial dependency rule)

    1. Augmented functional dependency is basically

    when X->Y holds and W is a set of attributes, then WX->WY also holds.

    Let me clarify the above two a bit more.

    Given a dependency A1A2....Am->B1B2....Bn we can say it is:

    • Trivial if the B's are subset of A's.
    • Augmented(or maybe non-trivial) if at least one of the B's is not among the A's
    • Completely non-trivial if none of the B’s is also one of the A’s


    3. Transitive functional dependency can occur only in a relation that has 3 or more attributes.Let A, B, and C designate three distinct attributes (or distinct collections of attributes) in the relation. Then given A->B and B->C then A->C is a transitive functional dependency.