Skip to content
Official PYQ · 2013

GATE CS 2013 Q54 — Normal Forms

Explain with AI

Relation RR has eight attributes ABCDEFGH\text{ABCDEFGH}. Fields of RR contain only atomic values. FF=

CH→G, A→BC, B→CFH, E→A, F→EG\text{{CH→G, A→BC, B→CFH, E→A, F→EG}} is a set of functional dependencies (FDs)(FDs) so that F+F^+ is exactly the set of FDsFDs that hold for RR.

How many candidate keys does the relation RR have?

Choose one option
View worked solution

Answer: B

To find the candidate keys of relation R(A,B,C,D,E,F,G,H)R(A, B, C, D, E, F, G, H), we first identify the attributes that do not appear on the right-hand side (RHS) of any functional dependency in FF:

  • DD and HH do not appear on the RHS of any FD. Thus, both DD and HH must be part of every candidate key.

Let's compute the attribute closure of the essential set {D,H}\{D, H\}:

{D,H}+={D,H}\{D, H\}^+ = \{D, H\}

Since {D,H}\{D, H\} is not a superkey, we must add other attributes to it to find the candidate keys:

  1. Testing AA: {A,D,H}+={A,D,H}→A→BC{A,B,C,D,H}→B→CFH{A,B,C,D,F,H}→F→EG{A,B,C,D,E,F,G,H}\{A, D, H\}^+ = \{A, D, H\} \xrightarrow{A \to BC} \{A, B, C, D, H\} \xrightarrow{B \to CFH} \{A, B, C, D, F, H\} \xrightarrow{F \to EG} \{A, B, C, D, E, F, G, H\} Thus, {A,D,H}\{A, D, H\} is a candidate key.
  2. Testing BB: {B,D,H}+={B,D,H}→B→CFH{B,C,F,H,D}→F→EG{B,C,E,F,G,H,D}→E→A{A,B,C,D,E,F,G,H}\{B, D, H\}^+ = \{B, D, H\} \xrightarrow{B \to CFH} \{B, C, F, H, D\} \xrightarrow{F \to EG} \{B, C, E, F, G, H, D\} \xrightarrow{E \to A} \{A, B, C, D, E, F, G, H\} Thus, {B,D,H}\{B, D, H\} is a candidate key.
  3. Testing EE: {E,D,H}+={E,D,H}→E→A{A,E,D,H}→A→BC{A,B,C,E,D,H}→B→CFH⋯={A,B,C,D,E,F,G,H}\{E, D, H\}^+ = \{E, D, H\} \xrightarrow{E \to A} \{A, E, D, H\} \xrightarrow{A \to BC} \{A, B, C, E, D, H\} \xrightarrow{B \to CFH} \dots = \{A, B, C, D, E, F, G, H\} Thus, {E,D,H}\{E, D, H\} is a candidate key.
  4. Testing FF: {F,D,H}+={F,D,H}→F→EG{E,F,G,D,H}→E→A{A,E,F,G,D,H}→A→BC⋯={A,B,C,D,E,F,G,H}\{F, D, H\}^+ = \{F, D, H\} \xrightarrow{F \to EG} \{E, F, G, D, H\} \xrightarrow{E \to A} \{A, E, F, G, D, H\} \xrightarrow{A \to BC} \dots = \{A, B, C, D, E, F, G, H\} Thus, {F,D,H}\{F, D, H\} is a candidate key.

Testing the remaining attributes CC and GG (e.g., {C,D,H}+\{C, D, H\}^+ or {G,D,H}+\{G, D, H\}^+) does not yield all attributes. Therefore, there are exactly 44 candidate keys: {A,D,H}\{A, D, H\}, {B,D,H}\{B, D, H\}, {E,D,H}\{E, D, H\}, and {F,D,H}\{F, D, H\}.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Normal Forms questions