Locks and isolation levels — controlling concurrent execution
This chapter explains shared and exclusive locks, the four transaction isolation levels and three read anomalies, the choice between optimistic and pessimistic locking, and the causes and avoidance of deadlocks. It covers how to hold a version column in the table and why raising the isolation level alone doesn't prevent contention without locks.