CS FundamentalsHardGATE CS · Amazon/Microsoft placement
R(A, B, C, D, E) has functional dependencies CE → BD, DE → A, BD → E. Which of the following is the complete set of candidate keys of R?
- A. {CE}
- B. {CE, BCD}
- C. {CE, ABCE}
- D. {AD, CE, BCD}
Correct answer: B. {CE, BCD}
Attributes never on a right side (C) must be in every key; extending them and testing closures gives exactly the minimal superkeys {CE, BCD}. Each closure covers all of R and no proper subset does, so these are all the candidate keys.
More DBMS and SQL questions
- Table Node(id, parent) rows: (1, NULL), (2, 1), (3, 1), (4, 2), (5, 2), (6, 4), (7, 3). What does this query return? sql WITH RECURSIVE…
- R(A, B, C, D, E) has functional dependencies AC → BD, A → CD, C → D, D → A. Which of the following is the complete set of candidate keys…
- Σ = {C → AE, E → B, AE → C, D → C}. Consider the FD AE → C while computing a canonical cover. Which statement about extraneous attributes…
- Which statement about a FOREIGN KEY constraint in standard SQL is correct?
- Table Score(name, pts) rows: ('a', 90), ('b', 85), ('c', 90), ('d', 70), ('e', 85), ('f', 60). What does this query return? sql SELECT…
- Table Staff(id, name, dept, pay, boss) rows: (1, 'Anu', 'Ops', 40, NULL), (2, 'Bala', 'Ops', 55, 1), (3, 'Chitra', 'Tech', 70, 1), (4…