The GATE Grind

GATE 2014 CS (CS1) – Question 31

Databases · Integrity Constraints and Normal Forms · 1 mark · Multiple choice

Relation $R=(E,F,G,H,I,J,K,L,M,N)$ has dependencies $EF\to G$, $F\to IJ$, $EH\to KL$, $K\to M$, $L\to N$. Find its key.

  1. $\{E,F\}$
  2. $\{E,F,H\}$
  3. $\{E,F,H,K,L\}$
  4. $\{E\}$

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) $\{E,F,H\}$

Explanation

E,F,H do not appear on any dependency right-hand side, so each is required in every key. Their closure adds G viaEF, I,J viaF, K,L viaEH, then M viaK and N viaL. The closure contains every attribute, so **{E,F,H}, B** is the minimal key.