SQL and Client-Server Databases
Aligned to the AQA 7517 specification
- Level
- Intermediate
- Reading time
- 5 min
- Published
- 13 June 2026
- Updated
- 1 July 2026
On this page
Key takeaways
- SELECT retrieves data, optionally filtered with WHERE and ordered with ORDER BY; JOIN combines rows from related tables, usually on a foreign key.
- INNER JOIN returns only rows with a match in both tables, while LEFT JOIN returns all rows from the left table with NULL for unmatched right-side columns.
- UPDATE and DELETE without a WHERE clause affect every row in the table; this is valid SQL that runs without error, so the missing WHERE is a logic error, not a syntax error.
- DDL (CREATE, ALTER, DROP TABLE) defines database structure, whereas DML (SELECT, INSERT, UPDATE, DELETE) manipulates the data inside it.
- Concurrent access risks the lost update problem; record locking, serialisation, timestamp ordering and commitment ordering control it, but locking introduces a deadlock risk.
Something not quite clicking?
Ask Aica to explain any part of this differently. Free, takes 30 seconds.
Key terms
- SELECT
- An SQL statement that retrieves data from one or more tables, optionally filtered with WHERE and sorted with ORDER BY.
- JOIN
- An SQL operation that combines rows from two or more tables based on a related column, usually a foreign key.
- INNER JOIN
- A join that returns only the rows where there is a match in both tables.
- LEFT JOIN
- A join that returns all rows from the left table plus matched rows from the right, with NULL for unmatched right-side values.
- DDL
- Data Definition Language: SQL statements such as CREATE TABLE, ALTER TABLE and DROP TABLE that define the structure of a database.
- DML
- Data Manipulation Language: SQL statements such as SELECT, INSERT, UPDATE and DELETE that manipulate the data in a database.
- Primary key
- A constraint that uniquely identifies each row in a table and cannot be NULL.
- Foreign key
- A column that references a key in another table (REFERENCES Table(Column)), enforcing referential integrity.
- Client-server database
- A database that allows multiple clients to access and modify it simultaneously, which introduces the problem of concurrent access.
- Record locking
- A concurrency control method where a client locks a record when reading it for update, forcing other clients to wait until the lock is released.
- Serialisation
- A concurrency control method that schedules transactions so they execute as if run sequentially, guaranteeing consistent results.
- Deadlock
- A situation where two clients each hold a lock the other needs and neither can proceed; databases use timeout or deadlock detection to resolve it.
Frequently asked questions
INNER JOIN returns only rows that have a match in both tables, so unmatched rows are excluded. LEFT JOIN returns all rows from the left table and matched rows from the right, putting NULL in the right-side columns where there is no match.
Every row in the table is affected. UPDATE Product SET Price = 0 sets every product's price to 0, and DELETE FROM Student deletes every student. These run without error, so the missing WHERE clause is a logic error, not a syntax error.
It occurs when two clients read the same value and both update it, so the second write overwrites the first and a change is lost. Record locking, serialisation, timestamp ordering or commitment ordering are used to prevent it.
Generate revision on any topic you study
Type any topic you're studying and Aicademy generates a complete lesson, quiz, and flashcard set, personalised to your level.
Lessons on anything
Structured, level-matched lessons on any topic you study
Practice quizzes
Find out what you actually know before the exam does
Flashcard sets
Lock in key concepts with instant revision cards
Ask Aica
Stuck on something? Get a clear explanation, any time
Database Normalisation
Big Data
Related lessons
5 min
6 min
Entity-Relationship Modelling and Relational Databases
A-Level Computer Science · AQA 7517
1 month ago
6 min