The big idea: A transaction groups several statements into one indivisible unit: either every one takes effect, or none does.
A bank transfer is two updates. Halfway through is a state the world must never see.
Without it, money is destroyed: If the system fails between the two updates, £500 has left A and never reached B. No error is reported — the first statement succeeded.
The transaction is what makes that outcome impossible rather than merely unlikely.
Free preview
This is the free notes preview
You're reading the free notes. Aimnova Pro unlocks the full study experience — and you can try it with your first topic free to keep:
- FlashcardsLock in vocabulary and key terms with spaced repetition.
- Practice questionsAnswer exam-style questions and get instant AI marking.
- Mock exams & past-paper vaultSit full mocks and see exactly how examiners award marks.
- Personalised study planA daily plan built around your exam date and weak areas.
| Property | Guarantees | Without it |
|---|---|---|
| Atomicity | All statements or none | Money leaves one account and reaches no other |
| Consistency | Every rule still holds afterwards | A loan row pointing at a deleted customer |
| Isolation | Concurrent transactions do not interfere | Two withdrawals both read the same balance |
| Durability | A committed change survives a crash | A confirmed payment vanishes on reboot |
Isolation is the one worth understanding: Two ATMs read a balance of £100 at the same time. Each checks that £80 is available, each approves, each writes £20 back.
£160 has been withdrawn from £100. Isolation is what makes the second transaction wait until the first has finished — and it is the property exam questions test most.
Durability means written, not remembered: Once COMMIT returns, the change has reached non-volatile storage. Pulling the power a moment later cannot undo it.
That is why a commit is slower than an ordinary write — it must wait for the disc.
See how examiners mark answers
Access past paper questions with model answers. Learn exactly what earns marks and what doesn't.
How isolation is achieved
- A transaction takes a lock on the rows it touches
- Another transaction wanting them waits until the first commits or rolls back
- That is what serialises the two ATM withdrawals
- Deadlock: A holds row 1 and wants row 2; B holds row 2 and wants row 1 — neither can proceed
- The database detects this and aborts one, which then retries
Locking costs throughput: Stronger isolation means more waiting, so fewer transactions per second. Some systems deliberately relax it where the risk is acceptable.
Naming that cost — rather than presenting ACID as free — is what a full-mark answer does.
How this is tested — you must trace what goes wrong without a transaction, and name the ACID property that prevents it. It comes up two ways:
Paper 1 Section A
- Describe how transactions maintain integrity, 3-5 marks
- State what ACID stands for
- Explain COMMIT and ROLLBACK
Paper 1 Section B — case study
- Explain a concurrency failure in a scenario
- Identify which property is being relied on
The classic trap: Listing ACID without applying it. The marks are for saying which property prevents the specific failure in the question — and what would happen without it.
Two people withdraw from the same account of £100 at two cash machines at the same instant, each requesting £80. Explain what could go wrong without transactions, and how ACID prevents it.
Model answer plan
See the mark-by-mark plan — for / against / judgement, with marking guidance — in study mode.