CS FundamentalsVery hardGATE
Using the same R(A, B, C, D, E) with AB → CDE and E → B, how many superkeys does R have in total?
- A. 8
- B. 9
- C. 31
- D. 12
Correct answer: D. 12
The candidate keys are AB and AE. Testing every subset's closure directly gives 12 superkeys in total: AB, ABC, ABD, ABCD, AE, ABE, ACE, ABCE, ADE, ABDE, ACDE, ABCDE. The overlap happens because E → B means any set containing A and E also contains (via closure) B, so it automatically becomes a superset of the key AB too — that is why there are more than the 8 you'd get from AB's supersets alone.
More DBMS and SQL questions
- R(A, B, C) has NO nontrivial functional dependencies at all (every attribute is independent of every other). What is R's only candidate…
- A relation R(A, B, C, D) has FDs A → BC and D → A (so D is also, indirectly, able to derive B and C). What are the candidate keys of R?
- A trigger-based implementation of a materialized view manually re-runs the entire defining query and replaces all the materialized rows…
- R(City, Street, Zip) has FDs City,Street → Zip and Zip → City, with candidate keys {City,Street} and {Street,Zip}. Decomposing into…
- A relation R(City, Street, Zip) has FDs City, Street → Zip and Zip → City (candidate keys: {City, Street} and {Street, Zip}). Why is this…
- The 3NF synthesis algorithm (based on a minimal cover of functional dependencies) is guaranteed to always produce a decomposition that is…