Relation candidate keys

relational-theory

I have the following relation:

R = ABCDE
F: AB->DE, AC->B, DE->C, AE->C, C->AB

I need to determine this relations candidate keys.

Now, if I understood the defintion correctly:

In the relational model of databases, a candidate key of a relation is
a minimal superkey for that relation; that is, a set of attributes
such that the relation does not have two distinct tuples

The candidate keys would be:
C, AB, AE, DE.

Is this correct or are there more?

Best Answer

A superkey (and therefore a candidate key) that does not contain all attributes must contain at least an attribute set that is the left side of a functional dependency. Otherwise it would not be possible to generate an additional attribute from the attribute set of this superkey and this contradicts the definition of a superkey.

But a subset of ABCDE containing at least one of C,AB,AE or DE is already a superkey and to be minimal it is necessary that it contains only one of these subsets.

So the only subsets that must me investigated are that that are supersets of AC. But a superset of AC cannot be a minimal superkey because C already is a key.

Therefore the only candidate keys are C,AB,AE and DE