Consider a relation schema R=(U, V, W, X, Y, Z), on which the following…

2024

Consider a relation schema R=(U, V, W, X, Y, Z), on which the following functional dependencies hold : {U→V, VW→X, Y→W, X→U} The candidate keys of R are:

  1. A.

    UY, VY

  2. B.

    UY, VY, XY

  3. C.

    UYZ, VYZ, VWZ

  4. D.

    UYZ, VYZ, XYZ

Attempted by 773 students.

Show answer & explanation

Correct answer: D

Key idea: Z must be in every candidate key because no functional dependency has Z on the right-hand side.

  • Closure of {U,Y,Z}: From U → V obtain V. From Y → W obtain W. From V and W use VW → X to obtain X. From X → U we already have U. Therefore {U,Y,Z}+ = {U,V,W,X,Y,Z}.

  • Closure of {V,Y,Z}: From Y → W obtain W. From V and W use VW → X to obtain X. From X → U obtain U, and then U → V gives V. Therefore {V,Y,Z}+ = {U,V,W,X,Y,Z}.

  • Closure of {X,Y,Z}: From X → U obtain U. From U → V obtain V. From Y → W obtain W. With V and W use VW → X (already have X). Therefore {X,Y,Z}+ = {U,V,W,X,Y,Z}.

Minimality check:

  • Z must be included because no FD determines Z; removing Z from any of the above sets prevents obtaining Z.

  • Removing U from {U,Y,Z} gives {Y,Z}, whose closure lacks V and X; removing Y from {U,Y,Z} gives {U,Z}, whose closure lacks W and X. Similar checks show the three sets are minimal.

Non-keys explanation:

  • A set like {V,W,Z} is not a key because although V and W give X and X gives U, there is no FD that produces Y, so {V,W,Z}+ does not include Y.

Final answer: The candidate keys are UYZ, VYZ, and XYZ.

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

Explore the full course: Mppsc Assistant Professor