Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

ACID transactions are database operations designed to make related changes reliable: atomicity, consistency, isolation, and durability. They can prevent partial updates and constrain what concurrent work can observe, but they cannot decide whether your application’s business rules are correct. The practical guarantee depends on the database, its configuration, and which storage resources participate in the transaction.

What are ACID transactions?

A transaction groups database operations into a unit of work. ACID describes four reliability properties the database aims to provide for that work:

  • Atomicity: the transaction’s changes succeed together or are rolled back together.
  • Consistency: committed work preserves the database rules that have been defined.
  • Isolation: concurrent transactions have controlled visibility into one another’s work.
  • Durability: committed changes persist through failures within the database’s documented guarantees and configuration.

These properties concern how a database handles transactions. They do not guarantee that application code has chosen the right operations or expressed the right business rule. MySQL’s InnoDB and the ACID Model explains ACID in the context of InnoDB and its reliability mechanisms.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What do atomicity, consistency, isolation, and durability mean?

Atomicity: related changes are all-or-nothing

Imagine an application transferring money between two accounts. It needs to debit one account and credit the other as a single unit. If the credit fails after the debit, the application should not leave only the debit committed. With atomicity, the transaction either commits the related work together or rolls it back.

#1 Best Overall

MySQL documents transaction controls such as START TRANSACTION, COMMIT, and ROLLBACK. But transaction boundaries matter: MySQL warns that atomicity is not guaranteed if a transaction involves multiple storage engines and one of them does not support transactions. See the MySQL transaction control statements documentation for those controls and caveats.

Consistency: committed work preserves defined rules

A consistent state is one that satisfies the rules encoded in the system. Those can include valid references between records, a nonnegative quantity where that constraint is enforced, or a balanced-ledger invariant. Database constraints can enforce some rules, while application logic may need to enforce others.

Rank #2
Sale
McGraw-Hill Education Database System Concepts | 7th Edition
  • Brand: McGraw-Hill Education
  • Database System Concepts, 7th Edition

ACID consistency means a transaction preserves the rules that have been defined; it does not invent those rules or verify that they match the real-world requirement. If an application implements an incorrect transfer rule, the database can reliably commit the wrong result while remaining consistent with its encoded constraints.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Isolation: concurrent work has controlled visibility

Isolation describes what overlapping transactions can observe and which outcomes the database permits. It does not necessarily mean that every transaction runs literally one at a time. Database systems use isolation levels and concurrency controls to balance predictable results with the ability to process work concurrently.

Common anomaly terms include dirty reads (seeing another transaction’s uncommitted changes), nonrepeatable reads (getting a different result when reading the same row again), phantom reads (seeing a different set of rows for a repeated query), and serialization anomalies (a combined outcome that cannot be explained as transactions running in some serial order). The names of isolation levels do not ensure identical behavior across products.

Database and version Documented default or mapping Documented behavior
MySQL InnoDB 8.4 REPEATABLE READ is the documented default. Offers READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, and SERIALIZABLE. The manual frames isolation as a balance among performance, reliability, consistency, and reproducibility.
PostgreSQL 16 READ UNCOMMITTED behaves as READ COMMITTED. REPEATABLE READ prevents phantom reads but can still allow serialization anomalies. SERIALIZABLE can reject a transaction if a concurrent outcome cannot be reconciled with a serial order.

These vendor-specific details are documented in the MySQL InnoDB 8.4 isolation-level manual and the PostgreSQL 16 transaction isolation manual. A stricter isolation choice can constrain concurrency and may mean waiting, retries, or a serialization failure that the application must handle.

Durability: committed work persists within stated limits

Durability concerns whether committed changes remain after failures. The promise is specific to a database’s behavior, configuration, and hardware assumptions—not an unconditional guarantee that applies identically to every machine or storage setup. MySQL’s ACID overview notes that durability depends on software features interacting with hardware configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

SQLite states that its transactions are atomic, consistent, isolated, and durable, including when interrupted by a program crash, operating-system crash, or power failure. That is SQLite’s documented guarantee, not a universal promise for every database configuration or hardware environment. See SQLite Is Transactional.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to use a transaction for related updates

A typical transactional workflow is to begin a transaction, make the related changes, check that required rules hold, then commit only if the whole unit succeeds. If an operation or validation fails, roll back instead.

  1. Begin: use the database’s transaction-start control. In MySQL, that is START TRANSACTION.
  2. Make related updates: perform all changes that must succeed or fail as a unit.
  3. Validate: check application-level conditions that database constraints do not enforce.
  4. Commit or roll back: use COMMIT when the work is valid; use ROLLBACK when it is not.

MySQL commonly runs with autocommit enabled, so each statement outside an explicit transaction is committed individually. Use an explicit transaction when several statements need one shared boundary. The exact controls and mixed-storage-engine caveat are covered in the MySQL transaction control statements documentation.

What ACID does not guarantee

  • Correct business decisions: the database cannot infer whether a transfer, inventory adjustment, or approval rule is right. Application logic and database constraints must encode the intended rules.
  • Identical behavior across databases: isolation-level names may map to different allowed observations and outcomes in different products.
  • Atomic participation by every resource: the guarantee applies within the transaction boundary and depends on participating storage engines supporting transactions.
  • Failure-proof persistence independent of setup: durability depends on the database’s implementation and configuration, as well as hardware assumptions.

Why ACID can involve trade-offs

Reliability and concurrency are related design concerns. Stronger isolation may require additional concurrency control, waiting, retries, or transaction rejection. The right question is not whether a database is simply “ACID” or “not ACID,” but what its documented behavior means for the workload and how the application handles contention and failures.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

SQLite illustrates a concrete concurrency limit without negating its transaction guarantees: separate connections can have multiple simultaneous read transactions, but only one simultaneous write transaction. A write can return SQLITE_BUSY if another connection has modified or is already modifying the database. Applications using SQLite should account for possible write contention and handle the documented locking behavior; see SQLite Transaction and Isolation In SQLite.

Quick Recap

Bestseller No. 1
Fundamentals of Database Systems
Fundamentals of Database Systems
hardcover, brand new
$251.73
SaleBestseller No. 2
McGraw-Hill Education Database System Concepts | 7th Edition
McGraw-Hill Education Database System Concepts | 7th Edition
Brand: McGraw-Hill Education; Database System Concepts, 7th Edition
$34.62

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.