Concurrency Control MCQs

Topic-wise practice questions for Database Management Systems. Test your knowledge, check solutions on demand, and pace your preparation.

Zero-leak answer engine • Rate-limited explanations
Practice in Timed Mode
Q1hard
An application uses Optimistic Concurrency Control (OCC). A transaction spends a long time performing calculations in its local buffer. When it finally tries to commit, it is told that the underlying data has changed, and it must restart. At which phase did this failure occur?
Q2hard
In a database using the Wait-Die scheme for deadlock prevention, Transaction T1 (Timestamp 10) requests a lock held by Transaction T2 (Timestamp 20). What happens?
Q3medium
When comparing Pessimistic and Optimistic locking, which is more suitable for a system with high data contention (many users trying to update the same rows)?
Q4medium
A transaction follows the Basic Two-Phase Locking (2PL) protocol. It has just released a shared lock on Table A. Can it now acquire an exclusive lock on Table B?
Q5easy
What is the primary benefit of Strict Two-Phase Locking (Strict 2PL) over Basic 2PL?
Q6medium
A system is using Multi-Version Concurrency Control (MVCC). When Transaction T1 (starts at Time 10) reads a row that was updated by Transaction T2 (commits at Time 15), what version of the row does T1 see?
Q7medium
Which of the following lock requests would be GRANTED if the data item is currently held under a Shared (S) Lock by another transaction?
Q8hard
A report runs SELECT SUM(salary) FROM Employees. Halfway through the scan, a concurrent transaction updates an employee's salary that the report has already scanned, and another employee's salary that the report has not yet scanned. The final sum is inconsistent. This is an example of:
Q9medium
Which of the following SQL statements explicitly requests an Exclusive Lock on the selected rows, preventing other transactions from even reading them in most locking-based engines?
Q10medium
If there are 3 transactions (T1, T2, T3) executing concurrently, how many possible Serial Schedules exist?