Consider R (A, B, C, D, E) be relation with following dependencies: C → F, E →…

2025

Consider R (A, B, C, D, E) be relation with following dependencies:
C → F, E → A, EC → D, A → B. Which of the following is a key for R?

  1. A.

    CD

  2. B.

    EC

  3. C.

    AE

  4. D.

    AC

Attempted by 844 students.

Show answer & explanation

Correct answer: B

Goal: Determine which attribute set is a key by computing attribute closures using the given functional dependencies: C → F, E → A, EC → D, A → B.

Compute closures for each candidate set:

  • Closure of EC:

    Start with {E, C}.

    E → A gives A; A → B gives B; EC → D gives D; C → F gives F.

    So EC+ = {A, B, C, D, E} (and F). EC+ contains all relation attributes, hence EC is a superkey. Neither E nor C alone yields all attributes (E+ = {E, A, B}; C+ = {C, F}), so EC is a candidate key.

  • Closure of CD:

    Start with {C, D}. C → F gives F; no dependency produces A, B, or E from C and D alone.

    So CD+ = {C, D, F}, which is not all attributes. CD is not a key.

  • Closure of AE:

    Start with {A, E}. E → A gives A (already present); A → B gives B. No rule yields C or D from A and E alone (EC → D needs C).

    So AE+ = {A, B, E}, not all attributes. AE is not a key.

  • Closure of AC:

    Start with {A, C}. A → B gives B; C → F gives F. EC → D requires E, which is not present.

    So AC+ = {A, B, C, F}, not all attributes. AC is not a key.

Conclusion: EC is the candidate key because its closure includes all attributes and it is minimal (neither E nor C alone is a key).

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor