Home » Database Management System » ACID Properties Of Transaction in DBMS

ACID Properties Of Transaction in DBMS

What is ACID?

ACID is an acronym used in database management systems that represents four essential properties—Atomicity, Consistency, Isolation, and Durability—which ensure that transactions are executed reliably and accurately. These properties guarantee that all database operations are completed fully, maintain data integrity, remain independent of other transactions, and are permanently stored even in case of system failures.

Properties of ACID

ACID properties are a set of rules in database management systems that ensure reliable and consistent execution of transactions. They guarantee that every transaction is processed accurately and maintains data integrity even in case of errors or system failures. ACID stands for Atomicity, Consistency, Isolation, and Durability, which together ensure that database operations are safe, complete, and dependable.

Following are the properties of ACID:-

1. Atomicity

It states that a transaction must be treated as a single atomic unit i.e. Either transaction executed successfully or completely failed. It should not stuck in between or execute partially. The states of the transaction should be defined before execution or after the execution or failure or abortion of the transaction.

For example: Suppose A has transferred $100 to B. In this case if money transferred successfully, amount should credit to Account B. But if failure occurs then amount should not credited to Account B, But Amount is already debited from A. So this situation is creating the data issue which show atomicity is not followed in this case.

So If Amount debited From Account A, It should credited to Account B.

2. Consistency

Transactions preserve the consistency of the database. It means we should not loose the integrity of data in any transaction. Suppose if some changes made on the database it should preserved the value before and after transaction.

For Example: To understand consistency better, Lets take an example of ticket booking System. Suppose if one person is trying to book the 2 movie ticket, But due to payment failure ticket not booked. But here two seat is reserved for that person because before payment we have to choose the seat. Now after the payment failure system should release the two reserved seat and increase the count of available seat.

If this updating not happened correctly, we can say data is not consistent.

3. Isolation

Isolation means data on one transaction should not impact the data of other transaction. As we know that at the same time there are multiple transactions are executed. If the two transactions are working on the same data then first one transaction will finish the operation then second will start. And if the two transaction are working on different database then they should not impact others database. This property is basically Isolation means one transaction should not impact others and each transaction should be isolated.

4. Durability

Transactions make sure that the modifications made on data should be persisting in database, even in the event of device failure.  Suppose if any modification done on the database, records should save permanently. And in case of system failures, database should survive. Otherwise there is huge loss.

For example, you can assume if banking database failed due to some issue. All records of the users will be lost which leads to trust issue and amount losses of the customer. Our durable system should protect from such scenario.

Conclusion

The ACID properties play a crucial role in ensuring that database transactions are executed in a safe, reliable, and consistent manner. They guarantee that every transaction is completed fully, maintains data accuracy, operates independently without interference, and remains permanently stored even in the event of failures. Together, these properties form the foundation of trustworthy database systems and are essential for handling real-world applications where data integrity and reliability are critical.