100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace

ACID Properties Cheat Sheet

ACID Properties Cheat Sheet

The four ACID guarantees, SQL transaction isolation levels, and the concurrency anomalies each isolation level prevents or allows.

1 PageIntermediateMar 18, 2026

The Four Properties

What ACID actually guarantees.

  • Atomicity- a transaction's operations either all succeed or all roll back together
  • Consistency- a transaction moves the database from one valid state to another
  • Isolation- concurrent transactions don't observe each other's uncommitted changes
  • Durability- once committed, changes survive crashes, power loss, and restarts

Atomicity in Practice

A transfer that must succeed or fail as a unit.

sql
BEGIN TRANSACTION;UPDATE accounts SET balance = balance - 100 WHERE id = 1;UPDATE accounts SET balance = balance + 100 WHERE id = 2;-- if either statement fails, the whole transaction rolls backCOMMIT;-- or: ROLLBACK;

Isolation Levels (weakest to strongest)

Standard SQL isolation levels.

  • READ UNCOMMITTED- can see other transactions' uncommitted changes (dirty reads)
  • READ COMMITTED- only sees committed data; default in Postgres, Oracle, SQL Server
  • REPEATABLE READ- a query returns the same rows all transaction long; MySQL InnoDB default
  • SERIALIZABLE- transactions behave as if run one at a time; strongest, most contention

Anomalies Isolation Prevents

Concurrency problems isolation levels guard against.

  • Dirty read- reading another transaction's uncommitted data
  • Non-repeatable read- re-reading a row returns different data after another commit
  • Phantom read- re-running a query returns new or missing rows after another commit
  • Lost update- two transactions overwrite each other's changes because neither saw the other's write
Pro Tip

Durability doesn't mean the data files are written instantly — it typically means the change is recorded in a write-ahead log that's fsync'd before COMMIT returns, so crash recovery can replay it even if the data files lag behind.

Was this cheat sheet helpful?

Explore Topics

#ACIDProperties#ACIDPropertiesCheatSheet#Database#Intermediate#TheFourProperties#AtomicityInPractice#Isolation#Levels#Databases#Concurrency#CheatSheet#SkillVeris
Advertisement
Sri Hayavadhana Info-Tech

Professional Web Designing Services

  • Responsive Websites
  • E-commerce Solutions
  • SEO Friendly Design
  • Fast & Secure
  • Support & Maintenance
Get a Free Quote

Share this Cheat Sheet