{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreif333kl3bvbulllxzmp2elc5f7ybno3bevs5hogvrpljj3c5ehlmi",
"uri": "at://did:plc:5sgu76a53rz3n6unbykmovqy/app.bsky.feed.post/3mloh6gfcvrs2"
},
"description": "ACID is the set of guarantees a database transaction provides: Atomicity, Consistency, Isolation, Durability. ACID is the bedrock contract that makes relational databases trustworthy for financial, inventory, identity, and other workloads where partial or inconsistent state is unacceptable.\n\n\nWhat each letter means\n\n * Atomicity. A transaction either completes entirely or has no effect. There is no halfway state visible to anyone else.\n * Consistency. A transaction takes the database from one va",
"path": "/engineering-glossary/acid-database-transactions/",
"publishedAt": "2026-05-12T18:46:29.000Z",
"site": "https://sahilkapoor.com",
"tags": [
"SQL",
"PostgreSQL",
"MVCC",
"OLTP",
"Eventual Consistency"
],
"textContent": "**ACID** is the set of guarantees a database transaction provides: Atomicity, Consistency, Isolation, Durability. ACID is the bedrock contract that makes relational databases trustworthy for financial, inventory, identity, and other workloads where partial or inconsistent state is unacceptable.\n\n## What each letter means\n\n * **Atomicity.** A transaction either completes entirely or has no effect. There is no halfway state visible to anyone else.\n * **Consistency.** A transaction takes the database from one valid state to another, respecting all declared constraints (foreign keys, uniqueness, check constraints).\n * **Isolation.** Concurrent transactions do not interfere with each other. Different isolation levels offer different tradeoffs between concurrency and anomalies.\n * **Durability.** Once a transaction commits, its effects survive crashes, power loss, and restarts.\n\n\n\n## Isolation levels\n\nSQL defines four standard levels from weakest to strongest:\n\n * **Read Uncommitted.** Sees others' uncommitted changes (dirty reads).\n * **Read Committed.** Sees only committed data, but the same query can return different results in a transaction (non-repeatable reads).\n * **Repeatable Read.** Stable reads within a transaction; phantom rows may still appear.\n * **Serializable.** Behaves as if transactions ran one at a time.\n\n\n\nMost databases default to Read Committed; some (PostgreSQL with serializable, CockroachDB) provide stronger guarantees via MVCC and serializable snapshot isolation.\n\nš\n\n**Related Terms**\nSQL, PostgreSQL, MVCC, OLTP, Eventual Consistency.",
"title": "ACID",
"updatedAt": "2026-05-13T19:14:39.244Z"
}