---
title: "Transactions and the ACID Promise"
description: "A transaction groups statements so they take effect together or not at all, keep the database's rules true, do not see each other half-done, and survive a crash once committed. Those four promises are"
canonical: https://lightmysky.com/learn/computing/transactions-and-the-acid-promise-mt_8Egjmafq-L
source: https://lightmysky.com/learn/computing/transactions-and-the-acid-promise-mt_8Egjmafq-L.md
retrieved: 2026-09-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Transactions and the ACID Promise

A transaction groups statements so they take effect together or not at all, keep the database's rules true, do not see each other half-done, and survive a crash once committed. Those four promises are what let application code stay simple.

Subject: Computing · Area: Data & Databases · Ages 19 to 21
Page: https://lightmysky.com/learn/computing/transactions-and-the-acid-promise-mt_8Egjmafq-L

## Ready when they can

- State each of the four properties in terms of what a failure would otherwise leave behind
- Identify a sequence of statements that has to be one transaction
- Explain what rollback restores and what it cannot undo

## Lesson: Four promises that let database code stay simple

A transaction is a bundle of steps the database runs together. Atomicity means all or nothing: either every step happens or none do, so money never leaves one account without arriving in the other.

Consistency means each transaction moves the database from one valid state to another, never breaking rules like a balance never dropping below zero. Isolation means concurrent transactions never see each other half done, as if each ran alone.

**Example.** Durability means committed work survives even a crash right after, because the database keeps a log it can replay. Rollback is the undo button for a transaction that cannot finish: it wipes partial steps and restores the last valid state. It cannot reach work already committed, like a confirmation message already sent.

**Tip.** Group statements that must stand together into one transaction, such as debit plus credit in a transfer. The database then handles the hard parts: no partial updates, no broken rules, no mixed overlaps, and no lost work.

**Recap.** Bundle related steps, and atomicity, consistency, isolation, and durability cover the failures for you.

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Reading a Query Plan](https://lightmysky.com/learn/computing/reading-a-query-plan-mt_spbbzsCoBB)

## Opens up

- [Distributed Transactions and the Blocking Case of Two-Phase Commit](https://lightmysky.com/learn/computing/distributed-transactions-and-the-blocking-case-of-two-phase-commit-mt_MP_B_a_EwW)
- [Isolation Levels and the Anomalies They Allow](https://lightmysky.com/learn/computing/isolation-levels-and-the-anomalies-they-allow-mt_utxPNgxveB)
