CS FundamentalsHardIBM · Deloitte pattern
A relation R(A, B, C, D, E) has FDs AB → C, C → DE. Which of the following is the candidate key, and how many non-prime attributes does R have?
- A. Candidate key AB; non-prime attributes are C, D, E (3 of them)
- B. Candidate key ABC; 2 non-prime attributes
- C. Candidate key AB; non-prime attributes are only D and E (2 of them)
- D. Candidate key ABCDE; 0 non-prime attributes
Correct answer: A. Candidate key AB; non-prime attributes are C, D, E (3 of them)
(AB)⁺ = {A,B} → apply AB→C → {A,B,C} → apply C→DE → {A,B,C,D,E} — covers everything, so AB is the (minimal) candidate key. Every attribute not in AB — that is C, D and E — is non-prime, giving 3 non-prime attributes.
More DBMS and SQL questions
- Which pair of properties must every primary key satisfy?
- Which ACID property guarantees that a transaction's changes are applied completely or not at all?
- Which of these SQL commands is a DDL (Data Definition Language) command?
- In an ER model, a weak entity set is identified by:
- Which SQL clause filters groups AFTER aggregation?
- Which statement about the SQL command TRUNCATE TABLE is correct?