##### Candidate key combinations

While finding candidate key how many combinations can we make?

Sumit Verma sumitverma 10 May 2017 03:25 pm

We can have any number of combinations. Keep one thing in mind that a candidate key should not be the subset of any other candidate key.
Example: Consider the relation R(A,B,C,D,E,F) and the following functional dependencies,
F = { A→ BCDEF
B→F
D→E }
Candidate Keys = {A, BC}

BHAWANA bhawanavats 10 May 2017 03:37 pm

IT Depends on the functional dependencies of the relation, as we know that candidate key is the minimal super key so it must determine all the attributes of the given relation. cases may arise here-

case 1: if attribute x only belongs to determinant part i.e. LHS part of non trivial FD then X must be part of every CK

case 2: if some attribute x donot belongs to non trivial fd set of relation then x must be part of every candidate key

case 3: if X->Y non trivial FD with prime attributes exists in R then R must contain at least 2 CK.

I hope u got ur ans.