Concurrency Control in DBMS (original) (raw)

Last Updated : 27 Oct, 2025

In a Database Management System (DBMS), Concurrency control is a mechanism in DBMS that allows simultaneous execution of transactions while maintaining ACID properties - Atomicity, Consistency, Isolation and Durability. It maintains the integrity, accuracy and reliability of data when multiple users or processes perform read/write operations concurrently. It helps manage issues like:

**Note: By implementing concurrency control techniques such as locking or timestamp ordering, DBMS ensures that transactions are executed safely and independently, even when they overlap in time.

Need of Concurrency Control

Concurrency control is essential to:

concurrency

Concurrency Control

Example:

Concurrency Problems in DBMS

When multiple transactions execute concurrently, several problems may occur:

Concurrency Control Protocols

Concurrency control protocols define rules to ensure correct and consistent execution of transactions. The main protocols are:

concurrency_2

Concurrency Control Protocols

1. Lock-Based Concurrency Control:

2. Timestamp-Based Concurrency Control:

Read more about Locked based concurrency control protocol & Timestamp based concurrency control protocol

Recoverable and Cascadeless Schedules

Concurrency control also ensures proper scheduling of transactions:

Recoverable Schedules:

Cascadeless Schedules:

Advantages of Concurrency Control

  1. **Reduced Waiting Time: Multiple transactions can proceed simultaneously, reducing idle time.
  2. **Improved Response Time: Faster access and interaction with the database.
  3. **Better Resource Utilization: Hardware and database resources are efficiently shared.
  4. **Increased System Efficiency: Higher throughput and better overall performance.

Disadvantages of Concurrency Control

  1. **Overhead: Managing locks and timestamps adds system overhead.
  2. **Deadlocks: Circular waits between transactions can halt progress.
  3. **Reduced Concurrency: Locking can limit the number of simultaneous transactions.
  4. **Complexity: Implementation in distributed or large systems can be difficult.
  5. **Inconsistencies: Rollbacks or long waits may cause temporary data inaccuracy or staleness.