CS FundamentalsHardAmazon · Microsoft MCQ pattern
R(A, B, C) has NO nontrivial functional dependencies at all (every attribute is independent of every other). What is R's only candidate key, and how many superkeys does it have?
- A. Candidate key A; 4 superkeys
- B. No candidate key can exist without any functional dependencies
- C. Candidate key ABC; 1 superkey (ABC itself)
- D. Candidate key ABC; 7 superkeys (every non-empty subset)
Correct answer: C. Candidate key ABC; 1 superkey (ABC itself)
With no FDs at all, no proper subset of {A,B,C} can determine the rest (nothing determines anything beyond itself), so the ONLY set whose closure covers all attributes is the full set ABC itself. ABC is therefore both the sole candidate key and the sole superkey — 1 superkey in total, since no smaller subset qualifies and there is nothing larger than the full attribute set.
More DBMS and SQL questions
- 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…
- Table Products(pid, pname, category, price, stock) rows: (1, 'Pen', 'Stationery', 10, 100), (2, 'Notebook', 'Stationery', 50, 0), (3…