Why do we need to find more Candidate key ?

Hello Sir,

Video No 40 - DBMS (Youtube)

Gate Question, Year - 2013


I'm still in doubt. You told that we need to check more combination if possible in this question but Candidate Key is nothing but minimal Super Key then if there are other possible then why should I try them? For Example: In your example why should I move to using 3 values (DCH Closure) ? Give any Counter Example to clear my doubt! And Your teaching way is really awesome ! Thanks a lot and keep making more videos.

Sumit Verma @sumitkgp
4 Oct 2017 11:50 pm

Suppose you have attributes 10 attributes in a relation R as below

R(A, B, C, D, E, F, G, H, I, J )

Now you start finding the candidate key. 
Candidate key:- The mininal set of attribute which can uniquely determine all the other attributes.(Note - NOT Minimum set).

You started by taking one attribute.

Suppose B can determine all the other (9) attributes then B is our candidate fine. (It's minimal)

Now, you know that any superset of B will also determine all the other attributes[ Consider AB, It will determine all the attributes because of B.
Now it can not be the candidate key because it's minimal version that it B, is already a candidate key ]. So now we can check taking 2 attributes at a time [example, CD , AD, IJ,....](but not BD, BA...).

You found that { GH, IJ } both the pair can determine all the other attributes. So both GH and IJ will also be our candidate keys. {Note- these are minimal version of itself because you can not remove I or H}.

And so on.