CS FundamentalsVery hardGATE CS
R(A, B, C, D, E, F, G) has the functional dependencies AB -> C, C -> D, D -> E, E -> C, F -> G, BG -> A and AE -> F. How many candidate keys does R have, and how many attributes are prime?
- A. 3 keys and 3 prime attributes
- B. 2 keys and 5 prime attributes
- C. 4 keys and 4 prime attributes
- D. 3 keys and 4 prime attributes
Correct answer: D. 3 keys and 4 prime attributes
Closure computation shows the candidate keys are ['AB', 'BF', 'BG'], whose union is ABFG. The prime attributes are exactly those appearing in some candidate key.
More DBMS and SQL questions
- R(A, B, C, D, E) has the functional dependencies A -> B, BC -> D, D -> E and E -> B. The decomposition R1(A, B), R2(B, C, D), R3(A, D, E) is
- Transactions are T1: R(A) W(A) R(B); T2: W(A) R(B) W(B); T3: R(B) W(A) (each executes its operations in the order shown). Of all possible…
- Basic timestamp ordering assigns timestamps TS(T1) < TS(T2) < TS(T3) < TS(T4) = 1, 2, 3, 4. For a data item Q, R(Q) is rejected if TS(T) <…
- An extendible hash index has bucket capacity 2 and uses the low-order bits of the integer key as the hash value (the directory starts with…
- A file of 32,000 pages is sorted with an external merge sort using 32 buffer pages: pass 0 produces sorted runs of 32 pages, and every…
- ARIES log: LSN1 T1 update P1; LSN2 T2 update P2; LSN3 T1 update P3; LSN4 begincheckpoint; LSN5 endcheckpoint with active transactions {T1…