Practice mode DBMS and SQL

Relation R(A, B, C, D, E) has functional dependencies A -> B, B -> C and CD -> E. Which of these is a candidate key of R?

Correct answer C. AD

Explanation

Neither A nor D appears on the right side of any dependency, so every key must contain both. The closure {A, D}+ adds B, then C, then E through CD -> E, covering all five attributes, so AD is a superkey, and it is minimal because A alone and D alone are not. ABD is a superkey but not minimal. CD cannot produce A or B.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.