Finding the Key (Candidate Key) for Relation (R(E,F,G,H,I,J,K,L,M,N))

Finding the Key (Candidate Key) for Relation (R(E,F,G,H,I,J,K,L,M,N))

Verified Sources
Sep 12, 2026

We are given a relation scheme
(R={E,F,G,H,I,J,K,L,M,N})
and functional dependencies (FDs): [ {E,F}\to {G},\quad {F}\to {I,J},\quad {E,H}\to {K,L},\quad K\to {M},\quad L\to {N}. ] A key is a candidate key—so it must be both:

  1. a superkey (its closure is all attributes), and
  2. minimal.

The standard method is attribute closure: compute the closure of each candidate set until we find one whose closure is all of (R), and then check minimality.

Mermaid view of dependencies:

Functional Dependencies: Attribute Closure (Candidate Key) Tutorial

Compute the closure for each answer choice and identify the key

  1. 1
    Step 1

    Use the given FDs to derive what each set can infer: (i) {E,F} gives G, (ii) {F} gives I and J, (iii) {E,H} gives K and L, (iv) K gives M, (v) L gives N.

  2. 2
    Step 2

    Start with closure (X^+={E,F}). From {E,F}→{G}, add G. From {F}→{I,J}, add I and J. No FD applies to create H, K, L, M, or N yet, so the closure is ( {E,F,G,I,J}). This is not all attributes, so {E,F} is not a key.

  3. 3
    Step 3

    Start with (X={E,F,H}). Add G via {E,F}→{G}. Add I,J via {F}→{I,J}. Add K,L via {E,H}→{K,L}. Then add M via K→{M} and add N via L→{N}. Thus closure becomes ( {E,F,G,H,I,J,K,L,M,N}=R). So {E,F,H} is a superkey.

  4. 4
    Step 4

    Verify no proper subset is a key:

    • If remove E: {F,H} cannot use {E,F}→{G} and cannot use {E,H}→{K,L}; closure lacks G,K,L,M,N.
    • If remove F: {E,H} lacks I and J (since only {F}→{I,J} gives them).
    • If remove H: {E,F} lacks K,L,M,N (since {E,H} is needed for K and L).
  5. 5
    Step 5

    Because {E,F,H} is a superkey and all its immediate proper subsets fail to determine all attributes, it is minimal. Therefore the key is (ii) {E,F,H}.

Pro Tip: closure-first is faster than testing all subsets

When options are given, compute closure for each option. Then minimality only requires checking immediate subsets; you don’t need to brute-force every subset.

Warning: Being a superkey is not enough

A set whose closure equals all attributes is a superkey, but only minimal superkeys are keys. Always verify minimality by removing attributes.

How to compute a candidate key from FDs

Choose an attribute set

1

Start with a plausible set (e.g., each answer choice)."

Compute closure

2

Repeatedly apply FDs whose left-hand side is contained in the current closure."

Check if closure equals R

3

If yes, you have a superkey."

Test minimality

4

Remove attributes and see whether the closure still reaches all of (R)."

Let’s summarize the key reasoning explicitly with derived inferences for option (ii) ({E,F,H}):

  • From ({E,F}\to {G}): add (G).
  • From ({F}\to {I,J}): add (I,J).
  • From ({E,H}\to {K,L}): add (K,L).
  • From (K\to {M}): add (M).
  • From (L\to {N}): add (N).

So ({E,F,H}^+ = R).
Other options fail because:

  • ({E,F}) can’t derive (H,K,L,M,N).
  • ({E,F,H,K,L}) is a superkey but not minimal since ({E,F,H}\subset {E,F,H,K,L}) is already a key.
  • ({E}) cannot trigger any FD (no FD has (E) alone on the left).

Therefore the key for (R) is ((ii)\ {E,F,H}).

Closure outcomes for the provided options

Whether each option’s closure equals all attributes of R

Key definitions and common pitfalls

Knowledge Check

Question 1 of 3
Q1Single choice

Using attribute closure, which set determines all attributes of R?