« Back to Glossary Index
Visit Us
Follow Me

ACID is an acronym used in computer science to describe a set of properties that guarantee reliable processing of database transactions. The four properties are:

  1. Atomicity: This property guarantees that each transaction is treated as a single, indivisible unit, which either succeeds completely, or fails completely. If any part of the transaction fails, the entire transaction fails and the database is left unchanged. For example, in a fund transfer transaction from one bank account to another, atomicity ensures that if a debit from one account succeeds but the credit to the other account fails, the entire transaction is rolled back, ensuring the consistency of the database.
  2. Consistency: The consistency property ensures that a transaction brings the database from one valid state to another, maintaining database invariants or rules. Consistency states that any transaction will bring the database from one consistent state to another. If a transaction is executed that violates the database’s consistency rules, the entire transaction will be rolled back and the database will remain unchanged.
  3. Isolation: The isolation property ensures that concurrent execution of transactions leaves the database in the same state as if the transactions were executed sequentially. This means that the execution of one transaction does not affect the execution of another transaction. If two transactions are running concurrently, the changes made by one transaction must be isolated from the other.
  4. Durability: The durability property guarantees that once a transaction has been committed, it will remain committed even in the case of a system failure. This is often achieved by storing transaction logs that can be used to recreate the system state right before the failure. A commonly used method to ensure durability is to use log files that record all changes to the database.

In summary, ACID properties are essential for any system where it’s critical that transactions are processed reliably, such as financial systems, booking systems, and more. It’s important to note that not all database systems fully support ACID properties. In some cases, the requirements of a specific application may require a compromise between these properties and the performance of the system. For example, many NoSQL databases opt for a more flexible model for the sake of speed and scalability.

You may also like...