CS FundamentalsHardGATE CS · Product placement
R(A, B, C, D, E) has functional dependencies B → C, A → BE, C → ABE, E → C. Which of the following is the complete set of candidate keys of R?
- A. {AD, BD, BE, CD, DE}
- B. {AD, BD, CD}
- C. {AD, BD, CD, DE}
- D. {AD, BD, CD, BDE}
Correct answer: C. {AD, BD, CD, DE}
Attributes never on a right side (D) must be in every key; extending them and testing closures gives exactly the minimal superkeys {AD, BD, CD, DE}. Each closure covers all of R and no proper subset does, so these are all the candidate keys.
More DBMS and SQL questions
- T1: W1(A), R1(A), W1(B) and T2: W2(A), R2(B). Of all 10 interleavings that keep each transaction's own order, how many are conflict…
- Table Product(pid, cat, price) rows: (1, 'X', 10), (2, 'X', 20), (3, 'Y', 20), (4, NULL, 30), (5, 'Y', NULL), (6, 'Z', 5). What does this…
- R(A, B) = {(1, 1), (1, 2), (1, 4), (2, 2), (4, 2), (4, 4)} and S(B, C) = {(1, 5), (3, 5), (3, 6), (4, 7)}. What is πA(R) − πA(R ⋈ S)?
- R(A, B) = {(1, 4), (2, 1), (2, 4), (3, 2), (3, 3), (4, 4)} and S(B, C) = {(1, 6), (1, 7), (2, 5), (2, 6)}. What is πA(R) − πA(R ⋈ S)?
- Which view is generally updatable in standard SQL (an UPDATE through it maps to exactly one base row)?
- A B+ tree has at most 7 children per internal node and at most 6 keys per leaf. A non-root internal node must have at least ⌈7/2⌉…