Study resource
Client server databases study guide
Study Client server databases with curriculum-aligned Study Guide resources, practice links, and exam-focused support.
At a glance
study guide
Resource type
Topic
Client server databases
Study guide overview
Deeper Study Guide: Reasoning About Concurrent Database Access
Use this guide to explain why concurrency creates a lost-update problem, select an appropriate control method, and apply the methods accurately to client–server database scenarios.
Core reasoning chain
A strong explanation should connect the features of the system in the correct order:
- A client–server database provides simultaneous access for multiple clients.
- Simultaneous access means that more than one client may read or edit shared data during overlapping periods.
- If two clients edit the same record at the same time, each may base its update on an earlier version of the record.
- If one update is written after the other without concurrency control, the later write can replace the earlier one.
- The earlier update is therefore lost, and the integrity of the database is not preserved.
- A control method is required to manage the concurrent access.
When answering an exam question, make the conflict explicit. Do not merely state that two clients access a database. Explain that both clients edit the same record and show how the value written by one client can overwrite the other client's change.
Applying the methods
For a scenario involving a shared record, first identify whether the problem is simultaneous editing. If it is, a record lock can be applied to prevent both clients from editing that record at the same time. One client edits while the other is prevented from making a conflicting edit until access is available.
If the question focuses on the order of operations, discuss serialisation. The key idea is that concurrent actions are controlled as an ordered sequence, avoiding an uncontrolled interleaving of conflicting changes.
If the question refers to timestamps, explain timestamp ordering. Operations are controlled using their timestamps so that conflicting operations follow the required time-based order. Do not replace this with a record-lock explanation: timestamp ordering is identified by the use of timestamps to determine order.
If the question refers to commits, explain commitment ordering. The relevant point is that concurrent operations are committed in an agreed order. Do not confuse the order in which a client begins editing with the order in which changes are committed.
Worked reasoning example
Suppose two clients read a record whose value is 10. Client A prepares an update to 11, while Client B prepares an update to 12. If Client A writes 11 and Client B then writes 12, the final value is 12 and Client A's update is lost. A record lock could stop Client B editing the record while Client A holds the lock. Alternatively, serialisation could ensure that the conflicting operations are handled in sequence. Timestamp ordering could use timestamps to control which operation is accepted first, while commitment ordering could control the order in which the operations are committed. The exact method named in an answer should match the wording of the question.
Exam application checklist
For a method question, include the method's name, the action it controls, and the effect on the conflicting edits. For a compare question, distinguish the methods rather than listing them. For an explain question, use a cause-and-effect structure: simultaneous clients cause a conflict; the conflict can produce a lost update; the named control method manages the conflict; database integrity is preserved.
Avoid claiming that the methods guarantee that every client update is merged into one value. The supplied issue is that uncontrolled concurrent editing can lose an update, and the methods control access or ordering to manage that problem.
Self-check questions
- Can you define what simultaneous access means in a client–server database system?
- Can you describe a lost update using two clients and one record?
- Can you explain why the later write may overwrite the earlier write?
- Can you distinguish a record lock from serialisation?
- Can you identify the role of timestamps in timestamp ordering?
- Can you identify the role of commitment in commitment ordering?
- Can you explain how each method helps preserve database integrity?
A complete answer should use the terms client, server, record, concurrent access, lost update, integrity, record locks, serialisation, timestamp ordering and commitment ordering accurately where relevant.
Ready to practise?
Choose your next step
Use the study guide for understanding, then switch into an active revision mode.
Related topics
