CS FundamentalsHardProduct-company MCQ pattern
Is the schedule R1(A), R2(A), W1(A), W2(A) conflict serializable?
- A. Yes, equivalent to T1 → T2
- B. Yes, equivalent to T2 → T1
- C. Yes, because no transaction reads a dirty value
- D. No; the precedence graph has a cycle T1 → T2 → T1
Correct answer: D. No; the precedence graph has a cycle T1 → T2 → T1
R1(A) before W2(A) gives T1 → T2; R2(A) before W1(A) gives T2 → T1. A cycle means it is not conflict serializable; this is the lost-update pattern, where T1's write is overwritten.
More DBMS and SQL questions
- Which isolation level prevents dirty reads and non-repeatable reads but may still allow phantom reads (in the SQL standard)?
- Which statement about basic two-phase locking (2PL) is correct?
- A B+ tree is built on a key of 9 bytes. A block is 1024 bytes and a block pointer is 6 bytes. What is the maximum order p (number of child…
- R(A, B, C, D) has A as its only candidate key. How many superkeys does R have?
- 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)…