CS FundamentalsModerateProduct-company MCQ pattern
Which statement about basic two-phase locking (2PL) is correct?
- A. It guarantees freedom from cascading rollback but not serializability
- B. It guarantees conflict serializability and freedom from deadlock
- C. It requires all locks to be acquired before the transaction starts
- D. It guarantees conflict serializability but not freedom from deadlock or cascading rollback
Correct answer: D. It guarantees conflict serializability but not freedom from deadlock or cascading rollback
Growing then shrinking phases ensure conflict serializability. Two transactions can still wait on each other's locks (deadlock), and releasing locks before commit allows cascading rollbacks; strict 2PL fixes the latter, conservative 2PL the former.
More DBMS and SQL questions
- 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)…
- 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?