Relation schema: R(A, B, C, D, E, F, G, H) Functional dependencies: F = {AB →…

2018

Relation schema: R(A, B, C, D, E, F, G, H)

Functional dependencies: F = {AB → C, C → A, B → CFH, E → A, F → EG}

How many candidate keys does relation R have?

  1. A.

    1

  2. B.

    3

  3. C.

    4

  4. D.

    5

Attempted by 207 students.

Show answer & explanation

Correct answer: A

Concept: In a functional-dependency set, any attribute that appears on the RHS of no FD can never be produced by closure of any other attributes, so it must belong to every candidate key. An attribute that appears on neither side of any FD is a special case of this: it is completely isolated and is therefore mandatory in every key.

Identify the mandatory attributes: Across F = {AB → C, C → A, B → CFH, E → A, F → EG}, the RHS attributes are A, C, E, F, G, H. So B (never on any RHS) and D (which appears on neither the LHS nor the RHS of any FD) can never be derived — both are mandatory in every candidate key.

Closure of BD:

  1. Start: BD+ = {B, D}.

  2. Apply B → CFH: add C, F, H → {B, D, C, F, H}.

  3. Apply C → A: add A → {A, B, C, D, F, H}.

  4. Apply F → EG: add E, G → {A, B, C, D, E, F, G, H}.

  5. BD+ now contains all eight attributes, so BD is a superkey, and since B and D are both compulsory it is minimal.

Cross-check (why not AB): AB+ = {A, B, C, F, H, E, G} — it reaches everything except D, because no FD has D on its RHS. So AB cannot determine D and is not even a superkey. Replacing D with any other attribute fails for the same reason, so no second minimal key exists.

Result: BD is the only minimal superkey, so R has exactly one candidate key.

Explore the full course: Up Lt Grade Assistant Teacher 2025