Search code examples
databasedatabase-designnormalizationdatabase-normalizationfunctional-dependencies

If I have relation R(A,B,C,D,E) and the FDs are A -> C, AB -> D, CD -> E, is E fully functional dependent on AB?


Let's say we have relation R(A,B,C,D,E)

The FDs are:
A -> C
AB -> D
CD -> E

I know that the key is AB.

My question is: Is E fully or partially dependent on AB?

I think it's fully dependent, since AB determines E if I use FD inference rules. But, my coworker says that E is partially dependent on AB since C is partially dependent on AB. What is the correct one?

Thanks for your help


Solution

  • It's fully dependent on AB because you don't have a dependency (even transitive one) A->E or B->E. In practical terms it means: if I tell you the value of A or B you couldn't tell me the value of E - you need both values to deduce the value. Take a look at this short page on functional dependencies:

    Y is fully functionally dependent on X and there should not be any Z→Y, Where Z is a proper subset of X.

    In this context A or B would be the subsets.

    Looking your whole relation in a bigger picture it seems like a theoretical construct. At least it would be poorly designed:

    • CD -> E breaks the 3rd normal form
    • A -> C breaks the 2nd normal form - C IS partially dependent on AB