How does this relation produce candidate keys?

Given relation


and that there are no functional dependencies:

How are candidate keys computed?


  • I suppose you mean there are no non-trivial functional dependencies (since dependencies like a -> a always hold).

    Each relation is a set, so it must have at least a candidate key, that is a set of attributes that determines each attribute of the relation.

    Consider an attribute like a, which is not present in any non-trivial functional dependency. In order to be determined by a candidate key, that candidate key must contains it.

    So the rule is very simple: each attribute that is not present in any non-trivial functional dependency must be present in every candidate key.

    In this case no attribute is present in any non-trivial functional dependency, so that the only possible candidate key is abc. In fact it determines all the attributes through the trivial dependency abc -> abc, and no other candidate key has this property.