Data Modeling Updated: 2026-04-03

What is ACID Transactions?

A set of properties of database transactions intended to guarantee data validity despite errors, power failures, and other mishaps.

From the field

ACID (Atomicity, Consistency, Isolation, Durability) is why you can trust that when the payment processor says "success," your bank account actually got debited. It's the contract that made relational databases the foundation of financial software for 40 years, and — this is the surprising part — it's now a feature that data-lake table formats (Apache Iceberg, Delta Lake, Apache Hudi) bring to S3/GCS/ADLS so you can finally have warehouse-grade guarantees on plain Parquet files.

Why ACID matters in the data lake era

Older data lakes (Hadoop + Hive + Parquet on S3) had no ACID. If two Spark jobs wrote to the same partition concurrently, you got corrupt data with no error. If a job failed halfway through a multi-file write, you got half-written partitions. Teams worked around this with elaborate coordination, staging directories, and manual cleanup — death by a thousand cuts. Iceberg/Delta/Hudi fix this with snapshot isolation, atomic commits, and write-ahead-log semantics on object storage. This is not a nice-to-have; it's what makes modern lakehouse architectures actually safe.

Field story

A retailer I worked with had a Spark job writing to S3 + Parquet. Once a month, a concurrent ingest and a batch refresh would collide — some customers saw duplicate orders in the dashboard for a few hours until the next full-refresh cleaned up. The bug was invisible in code review (both jobs were "correct" in isolation) and irreproducible locally. Migrating the same tables to Iceberg (snapshot isolation) eliminated the bug overnight. The job code barely changed; the storage format did all the work. Also, the previously scary "backfill production data" operation became safe — Iceberg snapshots let us test a backfill on a branch, validate it, and merge with a single atomic commit. ACID on the lake is not a luxury; it's table stakes for any workload with concurrent writers.

ACID stands for Atomicity, Consistency, Isolation, Durability — four properties that guarantee database transactions are processed reliably. ACID compliance is what makes relational databases trustworthy for financial systems, and it is now a key feature that table formats (Delta Lake, Iceberg) bring to data lakes.

The Four Properties

Atomicity — All or Nothing

A transaction either completes entirely or has no effect. If any part fails, the entire transaction is rolled back.
-- Transfer $100 from Account A to Account B
BEGIN TRANSACTION;
  UPDATE accounts SET balance = balance - 100 WHERE id = 'A';
  UPDATE accounts SET balance = balance + 100 WHERE id = 'B';
COMMIT;
-- If either UPDATE fails, BOTH are rolled back

Consistency — Valid State Transitions

A transaction moves the database from one valid state to another. Constraints (primary keys, foreign keys, CHECK constraints) are enforced.
  • Before: Account A has $500, Account B has $200 (total $700)
  • After: Account A has $400, Account B has $300 (total still $700)

Isolation — Concurrent Safety

Multiple transactions running simultaneously don't interfere with each other. Each transaction sees a consistent view of the data.

Isolation Levels (from weakest to strongest):

LevelDirty ReadsNon-Repeatable ReadsPhantom Reads
Read UncommittedPossiblePossiblePossible
Read CommittedPreventedPossiblePossible
Repeatable ReadPreventedPreventedPossible
SerializablePreventedPreventedPrevented
Most databases default to Read Committed. Snowflake uses Snapshot Isolation (between Repeatable Read and Serializable).

Durability — Permanent Commits

Once a transaction is committed, the data survives any subsequent crash, power failure, or hardware fault. Databases achieve this through write-ahead logs (WAL).

ACID vs BASE

PropertyACIDBASE
Full NameAtomicity, Consistency, Isolation, DurabilityBasically Available, Soft state, Eventual consistency
ConsistencyImmediate (strong)Eventual (weak)
Use CaseFinancial, transactionalHigh-throughput, distributed
DatabasesPostgreSQL, MySQL, SnowflakeCassandra, DynamoDB, MongoDB
TradeoffHigher latency, stronger guaranteesLower latency, weaker guarantees

ACID in Data Engineering

ACID is no longer just for OLTP databases. Modern data engineering relies on ACID guarantees:

  • Delta Lake: ACID transactions on S3/GCS data lakes
  • Apache Iceberg: Snapshot isolation for concurrent reads and writes
  • Apache Hudi: ACID upserts for CDC pipelines
  • Snowflake: Full ACID compliance for all operations
  • dbt: Runs transformations as atomic transactions in the warehouse
Without ACID on data lakes, concurrent Spark jobs can produce corrupted tables — a problem that table formats solved.

Key Points

Gotchas

ACID pitfalls that surprise practitioners:

  • "Consistency" in ACID is NOT the C in CAP theorem. ACID-C means "the transaction respects declared constraints" (PKs, FKs, CHECK). CAP-C means "all nodes see the same data at the same time." Confusion between the two causes endless arguments. Different contexts, same letter.
  • Isolation levels have subtle, dangerous defaults. PostgreSQL defaults to Read Committed. Snowflake defaults to Read Committed with snapshot-isolation semantics for queries within a transaction. MySQL defaults to Repeatable Read. What seems like "same code, different database" can behave very differently. Read the isolation-level docs for your specific database before writing any transactional logic.
  • Application-level "read then write" is often a bug. Classic pattern: SELECT balance FROM accounts WHERE id = 1; UPDATE accounts SET balance = WHERE id = 1; — two concurrent clients can interleave and lose updates. Use SELECT ... FOR UPDATE, atomic UPDATE expressions (balance = balance - 100), or Serializable isolation. This is the most common data-integrity bug I see.
  • Snowflake "transactions" are scoped to sessions. Multi-statement transactions require explicit BEGIN/COMMIT; auto-commit is on by default. Each statement is its own transaction unless you wrap explicitly.
  • Iceberg/Delta ACID depends on the catalog. Iceberg's atomic-commit guarantee requires an atomic catalog operation. Using file-system-based catalogs on S3 (prone to eventual consistency) vs. Hive Metastore, AWS Glue, Nessie, or Polaris gives different guarantees. Read your catalog's atomicity docs.
  • Long-running transactions hold locks and block others. A 2-hour dbt run inside a single transaction can block other writers. Keep transactions short; prefer MERGE on staging tables to avoid long-held locks.
  • Durability assumes fsync. Don't disable it. Postgres synchronous_commit=off trades durability for throughput — acceptable for analytics, dangerous for transactional data. Cloud replication (multi-AZ, streaming) doesn't help if the unacknowledged transaction was lost before being replicated.
  • Eventual consistency "BASE" is NOT the opposite of ACID. Many systems are a mix — DynamoDB has strong-consistency reads alongside eventual-consistency reads. "ACID or BASE" is a false dichotomy; real systems choose per-operation.

Frequently Asked Questions

What is ACID in databases?

ACID is a set of four properties — Atomicity, Consistency, Isolation, Durability — that define reliable database transactions. Atomicity: all-or-nothing, partial failures are rolled back. Consistency: transactions move the database between valid states, enforcing constraints. Isolation: concurrent transactions don't interfere with each other. Durability: committed data survives crashes. Together they make relational databases (PostgreSQL, MySQL, Snowflake) trustworthy for financial systems, order processing, and any use case where wrong data is worse than slow data. Modern data-lake table formats (Iceberg, Delta Lake) bring ACID to object-storage-based lakehouses.

What is the difference between ACID and BASE?

ACID (Atomicity, Consistency, Isolation, Durability) prioritizes strong consistency and transactional correctness; used by relational databases and modern lakehouse table formats. BASE (Basically Available, Soft state, Eventual consistency) prioritizes availability and throughput over strong consistency; used by distributed NoSQL systems (Cassandra, DynamoDB in default config, Riak). BASE accepts temporarily inconsistent state in exchange for always-available writes. Real systems are rarely pure ACID or pure BASE — Postgres logical replication is eventually consistent; DynamoDB supports strong-consistency reads; Kafka is configurable. Treat it as a spectrum, not a binary.

Why does ACID matter for data lakes?

Without ACID, concurrent writes to the same data lake table can corrupt data. Two Spark jobs writing to the same S3 partition produce unpredictable results — no error, just silently wrong data. Half-failed writes leave behind orphan files. Concurrent readers can see mid-commit state. Table formats — Apache Iceberg, Delta Lake, Apache Hudi — fix this by layering a metadata file (manifest/log) over Parquet files and making commits atomic via the catalog. Snapshot isolation means readers see a consistent point-in-time view even during writes. This is what makes modern lakehouse architectures safe for mixed-workload production use.

What are database isolation levels?

Isolation levels control how much concurrent transactions see each other's in-flight changes, from weakest to strongest: Read Uncommitted (dirty reads possible — rarely used), Read Committed (the common default in PostgreSQL and Snowflake), Repeatable Read (MySQL default; prevents non-repeatable reads), Serializable (strongest, but highest contention cost). Snowflake queries use snapshot isolation automatically. Higher isolation prevents more concurrency anomalies (dirty reads, non-repeatable reads, phantom reads) but costs more in lock contention and retries. Pick based on workload: analytical queries need little; transactional writes may need Serializable or explicit locking.

Is Snowflake ACID compliant?

Yes — Snowflake is fully ACID compliant. DML statements (INSERT, UPDATE, DELETE, MERGE) are atomic at the statement level. Multi-statement transactions via BEGIN/COMMIT are supported but note that auto-commit is on by default — each statement commits immediately unless wrapped in an explicit transaction. Snowflake uses snapshot isolation: queries within a transaction see a consistent point-in-time view. Micro-partitions plus metadata commit ordering provide durability. Cross-account or cross-database data sharing does not weaken ACID within an account.

Do Apache Iceberg and Delta Lake really provide ACID?

Yes, when used correctly. Both table formats provide atomic commits (via a metadata log), snapshot isolation for reads, and durability inherited from the underlying object store (S3, GCS, ADLS). The key caveat is the catalog — Iceberg's atomic commits require an atomic catalog operation (Nessie, REST, Glue, Hive Metastore). File-system-based catalogs on S3 historically had edge cases with eventual consistency, though S3 strong read-after-write consistency since 2020 largely closed that gap. Read the specific catalog's atomicity docs — the table format provides the framework, but the catalog enforces the critical atomic-commit operation.

What happens if ACID is violated in production?

Symptoms: duplicate records where uniqueness was assumed, missing updates (classic lost-update anomaly from interleaved reads/writes), balance totals that don't match ledgers, "phantom" rows appearing mid-query, dashboards showing inconsistent subtotals that don't add up to totals. Root causes: using the wrong isolation level, application-level read-modify-write without locking, concurrent writes to lake tables without ACID table format, using `synchronous_commit=off` or similar durability-weakening settings on critical data, or a bug in the application misunderstanding the transactional boundary. Fix by strengthening isolation, adopting ACID table formats (Iceberg/Delta), or refactoring logic to use atomic operations (MERGE, compare-and-swap, SELECT FOR UPDATE).

Related Terms

CAP TheoremData WarehouseApache IcebergData Modeling

Related Tools

PostgreSQLMySQLSnowflakeDelta LakeApache Iceberg

Learn More

Browse All Terms Read Articles