ACID – Atomicity, Consistency, Isolation, Durability

ACID is an acronym representing four key properties that ensure reliable and secure transaction processing in relational database management systems (RDBMS). These properties guarantee that even in the event of errors, power outages, or concurrent requests, data will not be corrupted or become inconsistent.

Meaning of Each Letter

  • Atomicity: A transaction is an indivisible unit of work. Either all its operations are successfully completed (the transaction is confirmed – commit), or in case of an error, none are executed, and the database state is reverted to its original condition (rollback). No partial changes are allowed.
  • Consistency: Every successful transaction transitions the database from one valid state to another valid state. All defined rules, constraints, triggers, and foreign keys must be strictly adhered to. If a transaction violates any of these conditions, it is aborted.
  • Isolation: Concurrent transactions must not interfere with each other. The result of multiple transactions running concurrently must be the same as if they had run strictly sequentially. This prevents anomalies such as dirty read or phantom read.
  • Durability: Once a transaction is committed, its changes are permanently recorded in the database and remain preserved even in the event of an unexpected system failure, hardware malfunction, or power outage (often ensured by a transaction log / WAL – Write-Ahead Logging).

Practical Application

ACID properties are absolutely crucial in systems where any data loss or inconsistency is unacceptable – typically in banking (money transfers between accounts), e-commerce (product reservations and payments), or accounting systems. In modern development, some NoSQL databases employ a compromise in the form of the BASE model, which prioritizes availability and performance over strict ACID.