P

PrepStack

Concurrency Control

Concurrency control is how a database lets many transactions run at once without them corrupting each other's data. Interviewers ask about it because locks, deadlocks (transactions stuck waiting for each other), isolation levels (how much transactions are kept apart) and versions are where real systems differ most, and a safe-sounding answer is often wrong for a particular database. After this section you can explain two-phase locking, handle a deadlock, name the three read problems and which isolation level stops each, say what the default is in PostgreSQL and MySQL, and describe snapshot isolation and its write skew.

Topics in this section