Skip to content

Database lock

A database lock coordinates concurrent access to data or database objects so incompatible operations do not proceed unchecked.

Software Development

Coordinate concurrent access

A database lock governs which operations may access particular data or objects at the same time. Scope and compatibility depend on the lock type. In a fictional example, two transactions want to change the same order row; one may have to wait for the other.

A row lock does not automatically block every read query across the whole table. Long open transactions can, however, increase waiting. Mutual waiting can cause a deadlock that the system must handle. Check lock scope, duration and error handling. A database lock is not a user permission and does not replace the business decision about which change is allowed.

Sources

Articles on this topic

Software Development with ASES

Custom software, web and mobile apps