CS FundamentalsHardProduct-company MCQ pattern
R(A, B, C, D) has A as its only candidate key. How many superkeys does R have?
- A. 15
- B. 8
- C. 7
- D. 4
Correct answer: B. 8
Every superkey must contain A; each of B, C and D may be in or out: 2³ = 8 (A, AB, AC, AD, ABC, ABD, ACD, ABCD). 15 is the total number of non-empty subsets.
More DBMS and SQL questions
- Table Emp(id, name, dept, salary, mgr) rows: (1, 'Asha', 'HR', 50000, NULL), (2, 'Ravi', 'IT', 70000, 1), (3, 'Meena', 'IT', 70000, 2)…
- Table Emp(id, name, dept, salary, mgr) rows: (1, 'Asha', 'HR', 50000, NULL), (2, 'Ravi', 'IT', 70000, 1), (3, 'Meena', 'IT', 70000, 2)…
- Table Emp(id, name, dept, salary, mgr) rows: (1, 'Asha', 'HR', 50000, NULL), (2, 'Ravi', 'IT', 70000, 1), (3, 'Meena', 'IT', 70000, 2)…
- Schedule: W1(A), R2(A), C2, C1, where C means commit. Which classification is correct?
- Under basic timestamp ordering, TS(T1) = 10 and TS(T2) = 20. T2 has read item X, so read-TS(X) = 20. T1 now issues write(X). What happens?
- R(A, B, C, D, E, F) has FDs A → B, BC → D, D → E, E → C, CE → F. Which of these is NOT a candidate key?