Lock Granularity
The level at which a database locks data during a transaction — row, page, table, or something in between.
If two users want to update the same table, the engine must prevent simultaneous modifications (risk of dirty reads and lost updates). But how fine-grained should the lock be? A table-level lock locks the entire table — no one touches it while you work. Simple for the engine but kills parallel transactions. A row-level lock locks only the rows you touch — many transactions can work in parallel so long as they don't overlap. Better throughput but higher overhead (more lock objects, more memory). In between lie page-level locks (lock memory pages) and intent locks (signals that a transaction intends to read or write at a level). Old systems like IMS and CODASYL used coarse locks; modern databases prefer row-level.