How does a database stay correct when many users change it at once?
Transaction processing and the ACID properties (atomicity, consistency, isolation, durability), record locking and serialisation to manage concurrent access, and redundancy through commitment ordering and backups.
An OCR H446 answer on transaction processing and managing concurrent access: the ACID properties (atomicity, consistency, isolation, durability), record locking and serialisation to prevent conflicting updates, and redundancy through commitment ordering and backups.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this dot point is asking
OCR wants the four ACID properties of a reliable transaction, how record locking and serialisation manage concurrent access (and the lost-update problem and deadlock), and how redundancy through commitment ordering and backups protects data. Expect a long question applying ACID and locking to a real system.
The answer
The ACID properties
Concurrent access and record locking
Serialisation and redundancy
Examples in context
Banking transfers rely on atomicity (no money lost between accounts) and durability (a committed transfer survives a crash). Ticketing and stock systems use record locking to stop overselling the last item. Airline booking systems serialise seat reservations so two passengers never get the same seat. Nightly backups and transaction logs let a bank recover after a failure. OCR links this to concurrent processing in Component 02 and to the normalised, SQL-driven databases in the rest of section 1.3.
Try this
Q1. State what the 'A' and the 'D' in ACID stand for and what each guarantees. [2 marks]
- Cue. Atomicity: a transaction is all-or-nothing (fully done or rolled back). Durability: once committed, changes are permanent and survive a crash.
Q2. Explain why record locking can lead to deadlock. [2 marks]
- Cue. Two transactions can each hold a lock the other needs and both wait indefinitely; this is resolved by an ordering of locks or by timeouts.
Q3. State one method of providing redundancy to protect database data. [1 mark]
- Cue. Regular backups (or transaction logs / ordered commitment) so data can be restored after loss or failure.
Exam-style practice questions
Practice questions written in the style of OCR exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
OCR 20208 marksAn online banking database is updated by thousands of users at once. Discuss how the ACID properties and record locking keep the data correct.Show worked answer →
Levels-of-response question; reward the four ACID properties applied plus locking.
Atomicity: a transaction is all-or-nothing, so a transfer that debits one account and credits another either completes fully or is rolled back, never leaving money debited but not credited. Consistency: a transaction takes the database from one valid state to another, preserving rules such as non-negative balances. Isolation: concurrent transactions do not interfere; each behaves as if it ran alone, so a half-finished transfer is not seen by others. Durability: once committed, changes survive a crash or power loss (written to permanent storage).
Record locking supports isolation: while one transaction is updating a record it locks it so others must wait, preventing the lost-update problem where two simultaneous edits overwrite each other. The drawback is that careless locking can cause deadlock, so an ordering or timeout is used. Top marks need all four ACID properties applied to the banking context plus locking explained.
OCR 20224 marksExplain the 'lost update' problem that can occur with concurrent access, and explain how record locking prevents it.Show worked answer →
Lost update (2 marks): two transactions read the same record at the same time, each modifies its own copy and writes back; the second write overwrites the first, so one update is lost (for example two clerks both book the last seat, and one booking vanishes).
Record locking (2 marks): when a transaction begins updating a record it places a lock on it, so any other transaction must wait until the lock is released before it can read or write that record. This serialises access to the record, so the second transaction works from the already-updated value and no update is lost. Markers reward the read-modify-write overwrite for the problem and "lock forces others to wait" for the fix.
Related dot points
- Compression (lossy and lossless, run length encoding and dictionary coding), encryption (symmetric and asymmetric) and hashing, including their characteristics, differences and appropriate uses.
An OCR H446 answer on compression, encryption and hashing: lossy versus lossless compression with run length encoding and dictionary coding, symmetric versus asymmetric encryption, and how hashing works, with the characteristics, differences and appropriate uses of each.
- The relational database model: entities, attributes, primary and foreign keys, entity relationships, the difference between a flat file and a relational database, and normalisation to first, second and third normal form.
An OCR H446 answer on relational databases and normalisation: entities, attributes, primary and foreign keys, entity relationships, the difference between flat-file and relational databases, and how to normalise data to first, second and third normal form.
- Structured Query Language (SQL): defining tables, and using SELECT, FROM, WHERE, ORDER BY, INSERT INTO, UPDATE, DELETE and joining tables to query and maintain a relational database, with referential integrity.
An OCR H446 answer on Structured Query Language: defining tables and using SELECT, FROM, WHERE, ORDER BY, INSERT INTO, UPDATE and DELETE, joining tables across a relationship, and the role of referential integrity in a relational database.
- Thinking concurrently: determining which parts of a problem can be tackled at the same time, the benefits and limitations of concurrent and parallel processing, and the difference between true parallel processing and concurrent processing on a single processor.
An OCR H446 answer on thinking concurrently: identifying which parts of a problem can be done at the same time, the benefits and limitations of concurrency and parallelism, and the difference between true parallel processing on multiple cores and concurrent processing on a single processor.
- The structure of the internet, the Domain Name System (DNS), URLs and IP and MAC addressing, the difference between the internet and the world wide web, and the protocols HTTP, HTTPS, FTP and the client-server model of the web.
An OCR H446 answer on the structure of the internet: the Domain Name System, URLs, IP and MAC addressing, the distinction between the internet and the world wide web, and the protocols HTTP, HTTPS and FTP within the client-server model of the web.