A relation R={A,B,C,D,E,F,G} is given with following set of functional…

2015

A relation R={A,B,C,D,E,F,G} is given with following set of functional dependencies: F={AD→E, BE→F, B→C, AF→G}. Which of the following is a candidate key?

  1. A.

    A

  2. B.

    AB

  3. C.

    ABC

  4. D.

    ABD

Attempted by 798 students.

Show answer & explanation

Correct answer: D

Determine whether {A, B, D} is a candidate key by computing its closure and checking minimality.

Compute the closure of {A, B, D}:

  • Start: {A, B, D}

  • Use AD → E: add E → {A, B, D, E}

  • Use B → C: add C → {A, B, C, D, E}

  • Use BE → F (we have B and E): add F → {A, B, C, D, E, F}

  • Use AF → G (we have A and F): add G → {A, B, C, D, E, F, G}

Since the closure equals all attributes {A,B,C,D,E,F,G}, {A,B,D} is a superkey.

Check minimality:

  • Remove A: {B, D}+ gives {B, C, D} via B → C, but cannot derive E, F, or G.

  • Remove B: {A, D}+ gives {A, D, E} via AD → E, but cannot derive B, C, F, or G.

  • Remove D: {A, B}+ gives {A, B, C} via B → C, but cannot derive D, E, F, or G.

Because no proper subset of {A,B,D} is a superkey, {A,B,D} is minimal and therefore a candidate key.

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

Explore the full course: Mppsc Assistant Professor