Consider the following database table having A, B, C and D as its four attributes and four possible candidate keys (I, II, III, IV) for this table:
Consider the following database table having A, B, C and D as its four attributes and four possible candidate keys (I, II, III, IV) for this table:
A | B | C | D
a₁ | b₁ | c₁ | d₁
a₂ | b₂ | c₃ | d₂
a₃ | b₃ | c₁ | d₃
I: {B} II: {B, C} III: {A, D} IV: {C, D}
If different symbols stand for different values in the table (e.g., d₁ is definitely not equal to d₂), then which of the above could not be the candidate key for the database table?
Show answerHide answer
Correct answer: (C) II only
Explanation
Attribute B has distinct values in all tuples, so {B} can be a candidate key, and {B, C} is then only a superkey (not minimal), because a candidate key is a minimal superkey. {A, D} and {C, D} have distinct values in all tuples, so both can be candidate keys. Hence only II could not be a candidate key.