aımnova
DashboardMy LearningCrash CoursesStudy Plan

Aimnova site navigation

Stay in the loop

Get the latest study resources and updates

New features, study tips and exam insights — straight to your inbox.

IB Diploma

  • IB Past Papers
  • IB Study Notes
  • IB Question Bank
  • IB Mock Exams
  • IB Revision

IB Subjects

  • IB Math AA
  • IB Math AI
  • IB Economics
  • IB Business Management
  • IB Physics
  • IB Biology
  • View all IB subjects→

IB Past Papers

  • IB Math AA HL Past Papers
  • IB Math AA SL Past Papers
  • IB Math AI HL Past Papers
  • IB Math AI SL Past Papers
  • IB Economics HL Past Papers
  • IB Economics SL Past Papers
  • IB ESS Past Papers
  • View all past papers→

Study Resources

  • Study Notes
  • Question Bank
  • Mock Exams
  • Crash Courses
  • Flashcards
  • Revision Guide
  • Exam Skills
  • Command Terms
  • Grade Calculator
  • Exam Timetable 2026

Aimnova

  • Features
  • Pricing
  • For Teachers
  • For Schools
  • For Parents
  • About Us
  • Blog
  • Contact
aımnova

IB study, practice and feedback built around the real exam.

TermsPrivacyCookies·© 2026 Aimnova. All rights reserved.c1e448f

Aimnova is not affiliated with or endorsed by the International Baccalaureate Organization (IB).

NotesComputer Science HLTopic 3.3Transactions and integrity
Back to Computer Science HL Topics
3.3.64 min read

Transactions and integrity (Computer Science HL)

IB Computer Science · Unit 3

Your first topic is free to keep

Know exactly what to write for full marks

Practice with exam questions and get AI feedback that shows you the perfect answer — what examiners want to see.

Start Free

Contents

  1. 1All of it, or none of it
  2. 2ACID
  3. 3Concurrency and locking
  4. 4Exam-style question
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.
BEGIN TRANSACTION;

  UPDATE Account SET balance = balance - 500 WHERE id = 'A';
  UPDATE Account SET balance = balance + 500 WHERE id = 'B';

COMMIT;        -- both take effect, permanently
-- ROLLBACK;   -- neither does
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.
Start Studying Free Full access to Aimnova Pro · cancel anytime
PropertyGuaranteesWithout it
AtomicityAll statements or noneMoney leaves one account and reaches no other
ConsistencyEvery rule still holds afterwardsA loan row pointing at a deleted customer
IsolationConcurrent transactions do not interfereTwo withdrawals both read the same balance
DurabilityA committed change survives a crashA 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.
Two timelines side by side showing both machines reading 100 before either writes
With isolation, machine 2 would have to wait until machine 1 committed, then read 20 and refuse.

See how examiners mark answers

Answer exam-style questions with model answers. Learn exactly what earns marks and what doesn't.

Try Exam Vault FreeYour first topic is free to keep • No credit card required

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.
IB-style questionExplain[6 marks]

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 answer broken into clear points, with guidance on how each point earns marks.

Claim your free topic

Try an IB Exam Question — Free AI Feedback

Test yourself on Transactions and integrity. Write your answer and get instant AI feedback — just like a real IB examiner.

what COMMIT and ROLLBACK do. [2 marks]

Related Computer Science HL Topics

Continue learning with these related topics from the same unit:

3.1.1Relational databases3.2.1Database schemas3.2.2ERDs3.2.3Data types
View all Computer Science HL topics
Improve your exam techniqueCommand terms, paper structure, and mark-scheme tips for Computer Science HL
Previous3.3.5Database viewsNextTypes of database3.4.1

43 practice questions on Transactions and integrity

Students who practiced this topic on Aimnova scored 82% on average. Try free practice questions and get instant AI feedback.

Try 3 Free QuestionsView All Computer Science HL Topics