UGC-NET Jul 2016 · Normal Forms (1NF, 2NF, 3NF, BCNF)

MCQ · 2 marks · Problem DBMS-NORM-0005

Consider the following database table having $\text{A, B, C}$ and $\text{D}$ as its four attributes and four possible candidate keys $\text{(I, II, III and IV)}$ for this table : $\begin{array}{|l|l|l|l|} \hline \text{A} & \text{B} & \text{C} & \text{D} \\ \hline a_1 & b_1 & c_1 & d_1  \\ \hline a_2 & b_3 & c_3 & d_1  \\ \hline  a_1 & b_2 & c_1 & d_2  \\ \hline \end{array}$ $\begin{array}{} \text{I : {B}} & \text{II : {B, C}} & \text{III : {A, D}} & \text{IV : {C, D}} \end{array}$ If different symbols stand for different values in the table (e.g., $d_1$ is definitely not equal to $d_2$), then which of the above could not be the candidate key for the database table?
  1. A
    $\text{I}$ and $\text{III}$ only
  2. B
    $\text{III}$ and $\text{IV}$ only
  3. C
    $\text{II}$ only
  4. D
    $\text{I}$ only

Solve it on GATE DA practice →More Relational Model & SQL problems

Show the worked solutionA candidate key must have distinct values in every row and be minimal. I: \(\{B\}\) takes \(b_1,b_3,b_2\), all distinct, so it can be a key. II: \(\{B,C\}\) is unique, but it contains \(\{B\}\), so it is not minimal and cannot be a candidate key. III: \(\{A,D\}\) gives \((a_1,d_1),(a_2,d_1),(a_1,d_2)\), all distinct; neither \(A\) nor \(D\) alone is unique, so it can be a key. IV: \(\{C,D\}\) gives \((c_1,d_1),(c_3,d_1),(c_1,d_2)\), all distinct and minimal, so it can be a key. Only II is ruled out.Answer: C

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com