Chapter 6

Locking

6.1 Introduction

An important property of transactions is that they are isolated. Technically, this means that the execution of transactions has the same effect as running the transactions serially, one after another, in sequence, with no overlap in executing any two of them. Such an execution is called serializable, meaning that it has the same effect as a serial execution. A serializable execution gives each user the easy-to-understand illusion that while the system is processing his or her transaction, it is doing no other work.

The most popular mechanism used to attain serializability is locking. The concept is simple:

■ Each transaction reserves access to the data it uses. This reservation is called a lock.

■ There are read ...

Get Principles of Transaction Processing, 2nd Edition 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.