A -> B
cannot be inferred as the following counterexample shows:
Assume C is a nonempty set of attributes. And B = C (hence B is also a nonempty set of attributes and each member of B is also member of C and vice versa).
By the reflexivity axiom it is obvious, that C -> C
holds. And since B equals C, also B -> C
holds.
Assume A is an empty set of attributes. Then clearly no nonempty set of attributes can be inferred from A. (One can't infer a customer's address from nothing).
CA denotes the union of C and A. Since A is empty, CA equals C.
Hence CA -> C
is the same as C -> C
which is true by the reflexivity axiom. And since B equals C also CA -> B
holds.
For those who don't think that empty sets are valid sets a more explicit example:
C = { street, telephone_number }
, B = C
, A = { street }
.
CA still equals C, hence CA -> B
holds, just as B -> C
. But clearly it'll be hard to infer a telephone number if you only know the street, hence A -> B
doesn't hold.
Since there are people who are convinced that the telephone number of a person functionally depends on the street that person lives in (which, if true, would indeed break my counterexample), I'll elaborate a little on that.
I live in a village that has many (i.e. more than one) streets. Each of those streets have buildings which are identified by a number. Each of those buildings have one or more apartments (like 3rd floor left) and in each of those apartments there live 1 or more persons. All those persons have a telephone. Some persons share a telephone, others won't.
A relation that describes the people in my village has the attributes street
, building_number
, apartment_number
, telephone_number
among others (name of the person, date of birth, ...).
Since a single value of street maps to many persons in many cases (the cases in which there's only a single building with a single apartment where only a single person lives are rare), this means that for each street there's a long list of telephone numbers (where "long" means "more than one").
Even if the full address is used (street, building number, apartment number) it is still possible to find several telephone numbers since potentially more than one person lives at that address.
And because some people share a phone, the telephone number is not a key for persons either. And since it isn't excluded that persons that share a telephone live at different addresses, there's not even a functional dependency between telephone number and street.
By the above there is no functional dependency between { street }
and
{ telephone_number }
, which means there isn't a functional dependency between { street }
and { street, telephone_number }
either.
Hence A -> B
doesn't hold.