Skip to main content

· 2 min read

ACID is an acronym that stands for Atomicity, Consistency, Isolation, and Durability, which are four properties that are desired in a relational database system. These properties ensure that database transactions are processed reliably and accurately, even in the event of failures or concurrent access by multiple users.

Atomicity

Atomicity: This means that a transaction is treated as a single, indivisible unit of work. Either all the steps of a transaction are executed successfully, or none of them are. This ensures that if any part of a transaction fails, the entire transaction is rolled back, and the database is left in its original state.

Consistency

Consistency: This means that a transaction must bring the database from one valid state to another. In other words, the database must remain consistent before and after the transaction. If a transaction violates any of the database's rules or constraints, it will be rolled back.

Isolation

Isolation: This means that each transaction is executed independently of all other transactions. Even if multiple transactions are being executed simultaneously, they should not interfere with each other. The isolation level determines how much one transaction can see and affect the data that is being accessed by another transaction.

Durability

Durability: This means that once a transaction is committed, its changes are permanent and will survive any subsequent failures or system crashes. The database must guarantee that the changes made by a committed transaction will persist, even in the face of power outages, hardware failures, or other types of system errors.

Together, these properties ensure that database transactions are processed reliably and accurately, making them an essential part of a robust and scalable database system.