CS FundamentalsVery hardGATE CS · Amazon/Microsoft placement
R(A, B, C, D, E) has functional dependencies CE → A, A → D, AC → DE, B → D. How many superkeys does R have?
- A. 3
- B. 6
- C. 2
- D. 8
Correct answer: B. 6
B and C never appear on a right side, so every key contains BC; the candidate keys are ABC and BCE. Supersets: 4 + 4 − 2 (ABCE is counted twice) = 6. 8 is the naive sum without inclusion–exclusion; 2 counts only the candidate keys, and 3 adds just R itself.
More DBMS and SQL questions
- R(A, B) = {(1, 1), (1, 3), (3, 1), (3, 2), (3, 3)} and S(B, C) = {(1, 5), (2, 5), (2, 6), (2, 7), (4, 6)}. How many tuples are in πA(R ⋈…
- R(A, B, C, D, E, F) has functional dependencies AE → F, A → BCD, F → B. What is the closure {AC}⁺?
- Assertion (A): For every relation schema there is a decomposition into 3NF relations that is lossless and dependency preserving. Reason…
- Σ = {A → D, AB → E, B → C, C → BE}. Consider the FD AB → E while computing a canonical cover. Which statement about extraneous attributes…
- The system crashes after the last record of this log (immediate database modification; <Ti, X> denotes an update with old and new values…
- R(A, B, C, D, E) has functional dependencies A → DE, C → AD, AD → C, E → AC. Which of the following is the complete set of candidate keys…