All mock tests are FREE till 31 December — register to save your progress
Unit 4 · Database Management Systems Paper 2 CS · 22 June 2026

For the relation schema r(M, Y, P, MP, C) and set of functional dependencies F = {M → MP, {M, Y} → P, MP → C}, which of the following is the key?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. {M, Y}

Explanation

The attribute closure of {M} is computed as follows: M → MP gives {M, MP}, and then MP → C gives {M, MP, C}; this closure never reaches Y or P, so M alone is not a key. The closure of {M, Y} is: M → MP adds MP; {M, Y} → P adds P; MP → C adds C — giving the complete attribute set {M, Y, MP, P, C}, so {M, Y} is a superkey. Dropping either attribute destroys this (M alone misses Y and P; Y alone determines nothing), so {M, Y} is minimal, making it a candidate key. {M, C} and {MP} alone can never derive Y or P, so they are not keys. The key is {M, Y}.

More Database Management Systems questions