12.4. Locking Methods for Concurrency Control

A lock is a variable associated with a data item that describes the status of the item with respect to possible operations that can be applied to it. It prevents access to a database record by a second transaction until the first transaction has completed all of its actions. Generally, there is one lock for each data item in the database. Locks are used as means of synchronising the access by concurrent transactions to the database items. Thus, locking schemes aim to allow the concurrent execution of compatible operations. In other words, permutable actions are compatible. Locking is the most widely used form of concurrency control and is the method of choice for most applications. Locks are granted ...

Get Database Systems: Concepts, Design and Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.