Suppose I have the following Functional Dependencies for a Relational Model:

$A \to C$

$B \to C$

According to the composition rule for functional dependencies we have:

If X → Y and Z → W, then XZ → YW

For the case above would it be correct to say:

$AB \to CC$

Leads to:

$AB \to C$

Would the composite $CC$ be the same as just $C$? And for a relational model would it be proper to separate $C$ into a relation such that $AB$ is the Primary Key? Or should I simply drop either of the relations $A \to C$ or $B \to C$?

I was told by my database professor that $AB \to C$ is wrong and I should dropped one of them when I have created a Logical Data Model. But I don't understand how what I said above is wrong.


In a relational model, CC would be redundant, it's like saying that 1 = 1 * 1. Using a real example, if A = person ID, B = person fingerprint, C = person name, then you would say that "given a person ID and fingerprint, the name of a person is Bob, Bob is the name of the person". Thus, I would argue that AB -> CC and AB -> C are equivalent, and the composition AB -> CC is not necessary.

given both A -> C and B -> C, then If you know did a search for "Bob" in the database, you would get both results for person ID's and person fingerprints. If fingerprints are stored together with person ID's, this means that your search result has one redundant entry for every result. Therefore it is much better design to only have the relation A -> C or B -> C to reduce the number of lookups. If A and B are in seperate entities, however, you might want both relations.

If you only specify AB -> C, you would not be able to use A -> C or B -> C, which are both true. Therefore you should not put this statement alone. However, if A -> B and B -> A, it might be valid, but usually inefficient. Now, to find AB given C (searching for all relations that match "Bob"), you need to lookup both person ID and person fingerprint, and match these two together (checking if A -> B or B -> A). It is faster to just check one attribute (look for only A or B, not both).

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.