Functional dependency if XY-->XZ then Y-->Z?

494 Views Asked by At

I know that if Y-->Z then XY-->XZ but does it work the other way? That is, if XY-->XZ then does that mean Y-->Z?

Is this true or false? and how do I justify?

1

There are 1 best solutions below

0
On BEST ANSWER

The statement is false. Consider for istance a relation Person with attributes SSN, Name, BirthDate, where SSN is unique, and Name and BirthDate can be not unique. The following FD holds in this relation:

SSN, Name → SSN, BirthDate

but from this you cannot infer that:

Name → BirthDate

since different persons with the same name could have different birth dates.

What is true is the so called decomposition rule:

{x → YZ} ⊢ X → Y

So, for instance, from

SSN → Name, BirthDate 

you can safely derive:

SSN → BirthDate