Question

Consider the relation scheme R=(E,F,G,H,I,J,K,L,M,N)R = (E, F, G, H, I, J, K, L, M, N) and the set of functional dependencies

{{E,F}→{G},{F}→{I,J},{E,H}→{K,L},{K}→{M},{L}→{N}}\{\{E, F\} \to \{G\}, \{F\} \to \{I, J\}, \{E, H\} \to \{K, L\}, \{K\} \to \{M\}, \{L\} \to \{N\}\}

on RR. What is the key for RR?

Choose one option
Official answer and solution
Official answer
B
From
Official GATE 2014 answer key

Solution

Identify the essential attributes that do not appear on the right-hand side of any functional dependency, then compute their attribute closure.

The relation scheme is R=(E,F,G,H,I,J,K,L,M,N)R = (E, F, G, H, I, J, K, L, M, N).
The given functional dependencies are:

  1. {E,F}→{G}\{E, F\} \to \{G\}
  2. {F}→{I,J}\{F\} \to \{I, J\}
  3. {E,H}→{K,L}\{E, H\} \to \{K, L\}
  4. {K}→{M}\{K\} \to \{M\}
  5. {L}→{N}\{L\} \to \{N\}

Check attributes that appear on the right-hand side (RHS) of any FD:

  • RHS attributes: {G,I,J,K,L,M,N}\{G, I, J, K, L, M, N\}.
  • Attributes never appearing on any RHS: {E,F,H}\{E, F, H\}.

Since E,F,HE, F, H cannot be determined by any other attributes, every candidate key of RR must contain {E,F,H}\{E, F, H\}.

Now compute the closure {E,F,H}+\{E, F, H\}^+:

  • Initial: {E,F,H}\{E, F, H\}
  • Using {E,F}→{G}\{E, F\} \to \{G\}: {E,F,G,H}\{E, F, G, H\}
  • Using {F}→{I,J}\{F\} \to \{I, J\}: {E,F,G,H,I,J}\{E, F, G, H, I, J\}
  • Using {E,H}→{K,L}\{E, H\} \to \{K, L\}: {E,F,G,H,I,J,K,L}\{E, F, G, H, I, J, K, L\}
  • Using {K}→{M}\{K\} \to \{M\}: {E,F,G,H,I,J,K,L,M}\{E, F, G, H, I, J, K, L, M\}
  • Using {L}→{N}\{L\} \to \{N\}: {E,F,G,H,I,J,K,L,M,N}=R\{E, F, G, H, I, J, K, L, M, N\} = R

Since {E,F,H}+=R\{E, F, H\}^+ = R and no proper subset of {E,F,H}\{E, F, H\} can be a key, {E,F,H}\{E, F, H\} is the unique minimal key for RR.

Final answer

B

Common trap

Selecting a non-minimal superkey such as {E,F,H,K,L}\{E, F, H, K, L\}.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2014 Computer Science and Information Technology (CS) Session 1
Question
31 of 65, printed as CS Q.21
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.