What is the ACID property in a database?

ACID stands for Atomicity, Consistency, Isolation, and Durability in its complete form. ACID characteristics are used to assess the transaction’s reliability.

  • Atomicity refers to completed or failed transactions, where transaction refers to a single logical operation on data. This implies that if any aspect of a transaction fails, the whole transaction fails and the database state remains unchanged.
  • Consistency means that the data meets all of the validity guidelines. The transaction never leaves the database without finishing its state.
  • Concurrency management is the primary objective of isolation.
  • Durability ensures that once a transaction is committed, it will occur regardless of what happens in between, such as a power outage, a fire, or some other kind of disturbance.

The four ACID properties are

ATOMICITY - Treat the whole transaction as a unit. Either you execute it from start to end or don’t execute it at all, you can’t have a partially executed state.

Consistency- The state of Database is to be maintained. If it was in consistent state before execution of transaction it should be consistent even after the transaction is committed.

Isolation- If two transactions are being executed simultaneously then each should be isolated from the other. They shouldn’t be even aware of the others existence, if they are not interfering in the flow of each other.

Durablity: If changes are made to Database, Database should hold the modified values.