Relational Theory – Counterexample for No Functional Dependencies

relational-theory

For instance in the following example

Let be F={AB→C, B→D, CD→E, CE→GH, G→A}

Do we have AB→G?

We don't have any functional dependencies.

I am able to show a functional dependency when it works but how to show a counterexample when it doesn't?

Best Answer

To find if the functional dependency AB→G is implied by F you should find the closure of the attributes AB under F, i.e. AB+.

These are the steps:

AB+ = AB
      ABC     (using AB→C)
      ABCD    (using B→D)
      ABCDE   (using CD→E)
      ABCDEGH (using CE→GH)

and since G belongs to AB+, then AB→G can be derived from F.