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
- Which of the following relational algebraic expressions is equivalent to the SQL query SELECT X FROM B WHERE Y ?
- A safe expression in relational calculus is one that is guaranteed to yield
- In order to define the relationship between two entity sets, which of the following operations can be used?
- Which of the following are true? A. A database may have only one primary key B. Every key is a candidate key C. There can be multiple candi…
- What is the correct sequence of database design process? A. Create conceptual schema B. Data model mapping C. Requirements collection and a…
- Match the LIST-I with LIST-IILIST-I LIST-II A. Wait-for graph I. Holds all locks until it commits B. Precedence graph II. Holds write-locks…