Optimistic locking
A strategy that assumes conflicts are rare, permits lock-free reads, and detects collisions only at commit time.
Common in modern web applications: read data freely, with no locks. At commit, check whether anyone else modified the same records while you worked. If not, write your changes. If yes, abort the transaction and retry. Lock-free means high concurrency; the cost is wasted work if conflicts are frequent.
Advantages: no blocking, excellent throughput under low contention. Disadvantages: expensive rollback under heavy concurrent writes. Works well in read-heavy systems or when the same rows are rarely modified together. MVCC is a more sophisticated variant that keeps multiple row versions alive simultaneously.