Last Updated: May 3, 2026
The previous chapter covered what guarantees the database provides when multiple transactions run concurrently. Locks are the primary mechanism the database uses to enforce those guarantees.
Understanding how locks work helps you write transactions that are both correct and performant, and it gives you the tools to control concurrency explicitly when isolation levels alone are not enough.