CS FundamentalsHardGATE CS · Amazon/Microsoft placement
R(A, B, C, D, E) has functional dependencies BD → A, E → B, B → E, AD → B. Which of the following is the complete set of candidate keys of R?
- A. {ABD, ACD, BCD, CDE}
- B. {ACD, BCD, ACDE}
- C. {ACD, BCD, CDE}
- D. {ACD, BCD}
Correct answer: C. {ACD, BCD, CDE}
Attributes never on a right side (CD) must be in every key; extending them and testing closures gives exactly the minimal superkeys {ACD, BCD, CDE}. Each closure covers all of R and no proper subset does, so these are all the candidate keys.
More DBMS and SQL questions
- Relations R (600 blocks) and S (90 blocks) are joined with block nested-loop join using M = 32 buffer blocks (M − 2 for the outer…
- Table Score(name, pts) rows: ('a', 90), ('b', 85), ('c', 90), ('d', 70), ('e', 85), ('f', 60). What does this query return? sql SELECT…
- How many of these statements are correct? 1. A table can have at most one clustering index. 2. A primary index on an ordering key field is…
- R(A, B, C, D) has functional dependencies B → C, A → BD, AC → D, C → AB. What is the highest normal form R satisfies?
- R(A, B, C, D, E, F) has functional dependencies CD → F, EF → D, F → D, AB → E. Which of the following is the complete set of candidate…
- Table P(x) rows: (1), (2), (2), (3), (NULL). Table Q(x) rows: (2), (3), (3), (NULL), (4). What does this query return? sql SELECT COUNT()…