---
title: "ACID"
slug: "acid"
category: "glossary"
tags: ["glossary", "backend", "database", "transactions", "postgres", "reliability"]
status: "stable"
last_updated: 2026-05-14
summary: "ACID defines four transaction properties (Atomicity, Consistency, Isolation, Durability) that guarantee reliable database operations despite failures."
related:
  [
    "[[backend/postgres]]",
    "[[backend/prisma]]",
    "[[glossary/base]]",
    "[[glossary/transaction-isolation]]",
    "[[glossary/write-ahead-log]]",
    "[[glossary/deadlock]]",
  ]
---

## Overview

This page is the atomic definition. Transaction patterns live at [[backend/postgres]].

## Definition

ACID is an acronym for four properties that guarantee reliable transaction processing. Atomicity: every operation in a transaction either commits entirely or rolls back entirely; there is no partial write. Consistency: a transaction moves the database from one valid state to another, respecting all constraints (foreign keys, check constraints, unique indexes). Isolation: concurrent transactions do not observe each other's intermediate state; the degree of visibility is controlled by the [[glossary/transaction-isolation]] level. Durability: once a transaction commits, the data survives crashes because the [[glossary/write-ahead-log]] flushes to disk before the commit acknowledgment. PostgreSQL, MySQL InnoDB, and most relational databases guarantee full ACID compliance. Systems that relax these guarantees in favor of horizontal scalability are often described as [[glossary/base]] systems.

## When it applies

Rely on ACID for financial ledgers, inventory counts, user account state, and any domain where partial writes produce incorrect results. Do not confuse the transaction guarantee with read-after-write consistency across replicas; ACID applies to the primary and its committed state.

## Example

A bank transfer debits account A and credits account B in the same transaction. If the process crashes between the two statements, the rollback restores both accounts. The debit never lands without the credit.

## Related concepts

- [[backend/postgres]] - PostgreSQL's MVCC architecture implements full ACID.
- [[glossary/base]] - the alternative consistency model used by distributed NoSQL systems.
- [[glossary/transaction-isolation]] - controls the I in ACID.
- [[glossary/write-ahead-log]] - the mechanism that provides Durability.
- [[glossary/deadlock]] - a failure mode that arises when two ACID transactions block each other.

## Citing this term

> See [[glossary/acid|ACID]] (llmbestpractices.com/glossary/acid).

## Related

- [[backend/postgres]]
- [[backend/prisma]]
- [[glossary/base]]
- [[glossary/transaction-isolation]]
- [[glossary/write-ahead-log]]
