Table of contents
1.
Introduction
2.
What is a Transaction?
2.1.
States of Transactions
3.
What are ACID properties?
3.1.
1. Atomicity
3.2.
2. Consistency
3.3.
3. Isolation
3.4.
4. Durability
4.
Some Important Points
4.1.
Property & Responsibility for Maintaining ACID Properties
5.
Understanding ACID Properties in DBMS
6.
Uses of ACID Properties in DBMS
7.
Advantages of ACID Properties
8.
Disadvantages of ACID Properties
9.
Frequently Asked Questions - Acid Properties in DBMS
9.1.
What is a transaction?
9.2.
What are the ACID properties?
9.3.
Why do we need ACID properties?
9.4.
What are some drawbacks of ACID Properties in DBMS?
10.
Conclusion
Last Updated: Mar 30, 2025
Medium

ACID Properties in DBMS

Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

The ACID properties in DBMS ensure that database transactions are processed reliably while maintaining data integrity. When changes occur in a database, it is crucial to prevent data corruption or inconsistency. Without these properties, transactions could lead to incomplete or conflicting data, impacting the system's reliability.

ACID stands for Atomicity, Consistency, Isolation, and Durability—four key properties that define how transactions function in a database management system (DBMS). These properties guarantee that transactions are executed securely, even in cases of system failures or concurrent operations.

ACID properties in DBMS

In this article, we’ll explore the ACID properties in DBMS in detail, explaining their significance with examples to understand their real-world application.

What is a Transaction?

A transaction is a single unit of a program that accesses and possibly updates one or more data items in the Database. A group of tasks where the task is a minimum processing unit that cannot be divided further. 

States of Transactions

  • Active: The transaction stays in this state while it is executing. 
     
  • Partially committed: After the final statement of the transaction has been executed. 
     
  • Failed: This is the state of transaction where it has been discovered that it can no longer be executed.
     
  • Aborted: After the transaction has been canceled and rolled back, the database has been restored to its state before the transaction. 
     
  • Committed: After the successful completion of a transaction.

States of Transactions

What are ACID properties?

ACID properties in DBMS refer to a set of four essential properties—Atomicity, Consistency, Isolation, and Durability, that ensure database transactions are processed reliably. These properties maintain data integrity by preventing partial updates, enforcing rules, isolating concurrent transactions, and preserving changes even in case of failures.

In SQL databases, ACID properties play a critical role in handling transactions efficiently, ensuring that operations remain secure and consistent. Whether in MySQL, SQL Server, or Oracle, these properties define how databases manage transactions to avoid data corruption or inconsistencies.

ACID Properties

1. Atomicity

The term atomicity means that we need to keep our data atomic. It means that if we need to perform a transaction on the data, it should be executed entirely or should not be executed at all. It also implies that the operation should not be performed partially or in different segments. In the case of executing operations on the transaction, the operation should be completely executed and not partially.

For Example:

Consider the following scenario:

  • Ninja has an account A with Rs.300 in his account. Ninja wishes to send Rs.100 to Pranay’s account, that is, account B. In account B, Pranay already has a balance of Rs.1000. 
  • When Rs.100 is transferred to account B, the balance will be Rs.1100. To do this transaction, there will be two operations that will take place. 
  • The first operation will be to debit Rs.100 from account A. And the second operation will be the credit of Rs.100 into account B. 
  • What if the first operation executes successfully but the second operation fails? 
  • A total of Rs.100 will be debited from account A without any credit in account B.

ACID Properties: Atomicity

From the above diagram, we can observe that after the credit operation of Rs.100, the balance in account B is still Rs.1000. Hence, it is not an atomic transaction.

The image below shows that both the debit and credit operations are successfully executed. Thus, the transaction is atomic.

 

ACID Properties: Atomicity

So, we can conclude that when the transaction loses atomicity in the bank system, it becomes a huge issue. Hence atomicity is the main focus in the bank systems.

2. Consistency

The term consistency in means that the value should always be maintained. The integrity of the data should always be maintained. If a transaction is executed in the database, its changes on the data should be preserved further in the database. In the case of transactions, Data integrity is essential to maintain the consistency of data. The data should always be correct.

For example:

ACID Properties:  Consistency

  • Consider three accounts A, B, and C, where A makes a transaction T one by one to both the accounts B and C. Debit and credit, two operations take place. 
  • The initial balance in accounts A, B, and C is Rs.3000, Rs.1000, and Rs.500.
  • Consider a transaction of Rs.500 from A to B. Debit of Rs.500 from A takes place and credit of Rs.500 to B. Similarly, a Debit of Rs. 200 takes place from account A and credit of Rs.200 to account C. 
  • After these operations, The value read in the balance of account A is Rs.2300. (which is the correct value after the net debit of Rs.700). This shows that the database is consistent. If account B and account C, read the value of Rs. 3000, then the database would be inconsistent.  

3. Isolation

The term isolation refers to separation. Isolation is the characteristic of a database where no data in this database should affect the other one. The changes in the databases can occur concurrently. 

The operation performed on one database should only begin when the changes in the first database are saved. It implies that if two different operations are being executed in two different databases, then they are independent of each other. 

In the case of transactions, when two or more transactions are executed simultaneously, consistency should be maintained in the database. Other transactions will not see any changes in the other database until changes are not committed in the memory.

For example

Consider two operations are concurrently running on two different accounts, then according to the isolation principle, the value of both accounts should not get affected. The values should be persistent. As seen in the below diagram, account A is executing T1 and T2 transactions to account B and account C. Both the transactions T1 and T2, are independently executed without affecting each other. It is known as isolation.

ACID Properties: Isolation

4. Durability

The term durability refers to the permanency of something. In database management, durability ensures that the data becomes permanent in the database after the execution of the operation. The durability of the data should be so reliable that even if the system fails or system crashes, the data and the database remains unchanged. It is the responsibility of the recovery manager to ensure the durability of the database.

To commit the values to the database, we use the COMMIT command after making the changes to the database. 

Therefore, the ACID property of DBMS plays a vital role in maintaining the consistency and availability of data in the database.

Some Important Points

Property & Responsibility for Maintaining ACID Properties

PropertyResponsibility for Maintaining Properties
AtomicityTransaction Manager
ConsistencyApplication Programmer
IsolationConcurrency Control Manager
DurabilityRecovery Manager

 

The ACID properties collectively ensure the correctness and consistency of a database. Each transaction functions as a group of operations that act as a single unit, producing consistent results, operating in isolation, and ensuring that committed updates are permanently stored.

Understanding ACID Properties in DBMS

ACID properties are four key characteristics that define the reliability and consistency of transactions in a Database Management System (DBMS). The acronym ACID stands for:

  1. Atomicity

    • Ensures that a transaction is treated as a single, indivisible unit.
       
    • If any operation within a transaction fails, the entire transaction is rolled back to maintain data integrity.
       
    • Either all operations succeed, or none of them are executed.
       
  2. Consistency

    • Guarantees that a transaction transitions the database from one valid state to another.
       
    • Ensures that constraints (such as unique and foreign keys) are maintained, preventing invalid data entry.
       
    • Preserves database integrity before and after a transaction.
       
  3. Isolation

    • Ensures that multiple transactions execute concurrently without interfering with each other.
       
    • Prevents issues like dirty reads, non-repeatable reads, and phantom reads by keeping transactions isolated until completion.
       
    • Uses different isolation levels in SQL databases to manage concurrency.
       
  4. Durability

    • Guarantees that once a transaction is committed, its changes are permanently stored.
       
    • Ensures data persists even after a system crash, failure, or restart.
       
    • Relies on database recovery mechanisms and logging systems.

Uses of ACID Properties in DBMS

Here are some key uses of ACID properties in DBMS:

  • Data Integrity Assurance: The ACID properties in DBMS prevent data corruption by ensuring that all transactions are processed completely or not at all (Atomicity), maintaining the integrity of the database.
  • Consistency Across Transactions: ACID properties ensure that transactions only bring the database from one valid state to another, preventing any inconsistencies in data, which is essential for maintaining a reliable database system.
  • Concurrent Transaction Management: Through Isolation, the ACID properties in DBMS allow multiple transactions to be processed simultaneously without affecting each other, ensuring that each transaction operates independently without causing data conflicts.
  • Durability After Failures: With Durability, ACID properties ensure that once a transaction is committed, its changes are permanent, even in the event of a system crash, providing reliability in databases like SQL Server and MySQL.
  • Robust Transaction Handling: Whether in Oracle or SQL, ACID properties of transactions ensure that complex, multi-step operations are executed accurately, maintaining both performance and reliability across different database platforms.

Advantages of ACID Properties

  • Data Integrity and Consistency: Ensures that database remains in a valid state before and after transactions, preventing corruption and data anomalies.
  • Reliability: Guarantees that transactions are fully completed or fully rolled back, reducing the risk of partial updates that can cause data inconsistencies.
  • Concurrency Control: Prevents issues like dirty reads, non-repeatable reads, and lost updates, ensuring stable multi-user environments.
  • Error Handling and Recovery: With the Durability property, databases can recover from crashes by rolling back or committing transactions correctly.
  • Ensures Atomicity: Transactions are executed completely or not at all, preventing half-executed changes that could leave the database in an invalid state.

Disadvantages of ACID Properties

  • Performance Overhead: Implementing ACID compliance requires extra processing (locking, logging, etc.), which can slow down performance, especially in high-volume systems.
  • Complexity in Implementation: Ensuring strict compliance with ACID properties can make database management systems more complex and require additional configuration.
  • Scalability Issues: ACID transactions can limit scalability in distributed databases, as ensuring consistency across multiple nodes increases latency.
  • Resource Consumption: ACID-compliant transactions require more system resources, such as memory and processing power, which can be costly for large-scale applications.
  • Locking and Blocking Issues: To maintain consistency, transactions may use locks that block other operations, leading to potential bottlenecks in concurrent environments.

Frequently Asked Questions - Acid Properties in DBMS

What is a transaction?

A transaction is a single unit of the program that accesses and possibly updates one or more data items in the database.

What are the ACID properties?

Atomicity, Consistency, Isolation, and Durability are the ACID properties followed in databases.

Why do we need ACID properties?

To maintain consistency in the database, before and after the execution of a transaction, we follow ACID properties.

What are some drawbacks of ACID Properties in DBMS?

ACID properties cause performance overhead because of additional processing required for maintaining data integrity and consistency. This also increases the complexity of the system, so we require more significant expertise and resources.

Conclusion

The ACID properties in DBMS are essential for ensuring reliable and secure database transactions. These properties prevent data corruption, maintain integrity, and ensure consistency across SQL databases like MySQL, SQL Server, and Oracle. Understanding and implementing ACID properties is crucial for maintaining a robust and efficient database system.

For more information about database management, You can also expand your knowledge by referring to these articles on DBMS.

Also Read - Cardinality In DBMS

Live masterclass