Client server databases — AQA A-Level Computer Science
A client-server database architecture distributes processing between client applications that submit queries and a central database server responsible for query execution, security, and data integrity. In multi-user systems, managing concurrent access through techniques such as record locking and timestamp ordering is vital to uphold ACID properties and prevent data corruption.
Client server databases explained
This statement requires you to know that in a client-server database system the database is held on a central database server, and that many client computers can connect to that server at the same time.
Read the full explanation
Each client sends requests, such as queries or updates, over a network, and the server processes them and returns results. Because the database is shared, the server must manage simultaneous access so that clients do not corrupt each other's data. It does this through mechanisms such as transaction control and locking, which temporarily restrict access to records being changed. Understanding this model means recognising that the database is centralised rather than copied onto every client, which allows many users to work with a single, consistent set of data at once.
Your focus
- Know that a client server database system provides simultaneous access to the database for multiple clients.
Which command word is this?
Set out the technical causes and effects step-by-step, showing how a specific mechanism (e.g., record locking) produces a concrete outcome (e.g., preventing a lost update).
Client server databases exam tips
Topic Overview
Client-server databases divide data management into two distinct layers: client applications that present data to users and dispatch queries, and a centralized database server running a Database Management System (DBMS). The client sends structured queries over a network, while the server executes query plans, enforces referential integrity, and returns only the necessary result sets.
This architecture forms the bedrock of modern multi-user enterprise applications, allowing thousands of distributed nodes to access consistent data stores simultaneously. Success in this topic requires understanding the mechanics of client-server separation alongside concurrency control mechanisms like record locking, timestamp ordering, and ACID principles.
Key Concepts
- →Client-Server Separation: Clients execute presentation and business logic, while the central server runs the DBMS engine, manages physical storage, and enforces relational integrity.
- →Concurrency Hazards: Interleaved execution of concurrent read and write operations can cause lost updates, uncommitted dependencies (dirty reads), and inconsistent analysis.
- →Record Locking: A pessimistic concurrency technique that reserves a specific row during an active transaction to guarantee isolation, at the risk of inducing deadlocks.
- →Timestamp Ordering: An optimistic or non-locking concurrency control technique where transactions are assigned chronological timestamps to establish serialisable execution order.
- →ACID Properties: The four transactional guarantees (Atomicity, Consistency, Isolation, Durability) that ensure database validity despite system failures and concurrent users.
Marking Points
- States that the database resides on a central server accessed by multiple clients over a network.
- Explains that the server handles requests from many clients at the same time.
- Describes that the server controls concurrent access, for example with locking or transactions, to keep data consistent.
- Contrasts client-server access with a single-user arrangement in which only one user can change the data at a time.
- Gives a realistic scenario, such as many booking agents using one shared database simultaneously.
Examiner Tips
- 💡Identify which component stores the data and which component makes requests in any scenario given.
- 💡Link simultaneous access to a practical outcome such as shared, up-to-date information.
- 💡Mention the role of the server in managing concurrent access when a question asks how multiple users are supported.
- 💡Contrast network traffic when comparing client-server systems to file-server systems; emphasize that client-server transfers only processed result sets rather than entire raw files.
- 💡In concurrency questions, always state the exact name of the hazard (e.g., 'lost update' or 'uncommitted dependency') rather than using vague phrases like 'the data becomes corrupted'.
- 💡Reference write-ahead transaction logging on non-volatile secondary storage when explaining the mechanics behind the Durability property.
Common Mistakes
- Describes each client holding its own full copy of the database, which removes the shared-access benefit; the single database resides on the server.
- Assumes simultaneous access means clients never conflict, when the server must still manage conflicting changes; mention locking or transactions.
- Confuses the client and server roles, stating the client stores and manages the database; the server holds and manages it while clients send requests.
- Assuming client-server means downloading the whole database: Students often believe clients download the entire table to filter rows locally, whereas the server executes the filter and returns only matching records, conserving bandwidth.
- Believing record locking locks the whole database: Record locking applies exclusively to the targeted tuple or record, allowing other clients unfettered access to all other records in that table.
- Thinking timestamp ordering causes deadlocks: Timestamp ordering does not lock resources; conflicts are resolved by aborting and restarting transactions, completely eliminating deadlocks.
Revision Plan
- 1Day 1: Diagram the client-server database architecture, distinguishing client responsibilities from DBMS server responsibilities.
- 2Day 2: Trace the lost update problem, uncommitted dependency, and inconsistent analysis using multi-column chronological timeline tables.
- 3Day 3: Study concurrency solutions by comparing the operational algorithms of two-phase record locking versus timestamp ordering.
- 4Day 4: Review ACID properties in detail, writing out explicit definitions and failure scenarios for each letter.
- 5Day 5: Complete AQA A-Level exam questions focusing on 6-mark and 9-mark evaluation prompts on database architectures and concurrency.
Exam Question Types
- 📋Architecture comparison: Contrasting client-server databases with file-server configurations in terms of network load, processing power, and security.
- 📋Concurrency trace questions: Providing a chronological sequence of reads and writes from two users and asking students to identify the hazard and explain the resulting inconsistency.
- 📋Mechanisms and trade-offs: Discussing the trade-offs between record locking (deadlock risk) and timestamp ordering (re-execution overheads).
Command Word Expectations (AQA)
Set out the technical causes and effects step-by-step, showing how a specific mechanism (e.g., record locking) produces a concrete outcome (e.g., preventing a lost update).
Provide a balanced exploration of different perspectives or trade-offs (e.g., the benefits of concurrent throughput versus the risks of deadlocks and overhead costs), concluding with a justified assessment.
Identify explicit similarities and differences between two technical concepts (e.g., client-server versus file-server databases), linking them directly using comparative terminology.
How Students Lose Marks (Examiner Pitfalls)
Step-by-Step Worked Solutions
Question: A ticketing company uses a client-server database architecture. Explain how record locking prevents the lost update problem during seat reservations, and evaluate one disadvantage of this technique.
- 1.Step 1: Explain initial lock acquisition. When Customer A selects a specific seat, the client sends a request and the database server places an exclusive write lock on that specific seat record, blocking concurrent write access.
- 2.Step 2: Trace concurrent access under lock. If Customer B attempts to reserve the identical seat simultaneously, the DBMS forces Customer B's transaction to wait or fail because the record is locked.
- 3.Step 3: Detail transaction completion and release. Customer A completes payment, the DBMS writes the updated reservation status to disk, commits the transaction, and releases the lock.
- 4.Step 4: Analyze the main disadvantage (Deadlock / Latency). If multiple transactions lock multiple records in conflicting sequences (e.g. Transaction 1 locks Seat A and awaits Seat B; Transaction 2 locks Seat B and awaits Seat A), a deadlock occurs, requiring the DBMS to abort and roll back transactions.
Question: Describe the respective roles of the client and the server when running a parameterised SQL search query, and identify the ACID property that guarantees committed changes survive an unexpected server crash.
- 1.Step 1: Define the client role. The client provides the user interface, captures input parameters, performs basic input validation, constructs the query request, and transmits it across the network.
- 2.Step 2: Define the server role. The database server authenticates the client, parses and compiles the SQL query execution plan, accesses secondary storage, executes the search via the DBMS engine, and returns only the filtered result set.
- 3.Step 3: Identify the relevant ACID property. Durability guarantees that once a transaction has committed, all modifications are recorded permanently in non-volatile storage (such as via write-ahead transaction logs) and will survive any subsequent system crash.