Loading...
A table represents a collection of records sharing fields. A primary key uniquely identifies a record; a foreign key links to a key in another table. A person’s name is not always a suitable primary key because names can repeat or change. A relational design can separate entities to reduce repeated data and support consistent updates. Use the level of normalisation and relationship detail required by the board rather than assuming every GCSE question needs an advanced database design.
Video by Craig'n'Dave. The video’s own board label is retained; follow the specification reference and scope notes on this lesson for assessed content.
Viewing focus: Explain records, fields and keys
After watching, attempt these questions before opening the answers. You can also use the written lesson below.
After watching 1: What does WHERE do?
Filters records. It restricts the result to matching rows.
After watching 2: Does SELECT itself change the stored table?
No. It retrieves a result.
What you'll be able to do
A table represents a collection of records sharing fields. A primary key uniquely identifies a record; a foreign key links to a key in another table. A person’s name is not always a suitable primary key because names can repeat or change. A relational design can separate entities to reduce repeated data and support consistent updates. Use the level of normalisation and relationship detail required by the board rather than assuming every GCSE question needs an advanced database design.
SELECT names the fields to return, FROM names the table and WHERE filters records by a condition. ORDER BY sorts the result. Text literals need appropriate quoting. Conditions can combine with AND and OR, and parentheses clarify the intended logic. The output is a result set: it does not by itself modify the stored records. A SELECT * includes every field, which may reveal more data than the task requires.
Trace a query by applying the filter to each record and then selecting and sorting the required fields. SQL tables have no guaranteed presentation order unless ORDER BY specifies one. A returned empty result is different from an invalid query. For board-specific practical work use the supported SQL subset, and avoid treating Python list syntax or pseudocode operators as automatically valid SQL.
SELECT name, score
FROM Results
WHERE score >= 50
ORDER BY score DESC;Scroll horizontally to see the full code or table.Attempt these problems on paper before opening the worked reasoning. Explain your steps as well as giving a final answer.
Common mistakes to avoid
Key takeaways
Question 1: Why may a student number be a better primary key than a name?
A stable unique identifier distinguishes records reliably.
Check the assessed scope and practical or mathematical requirements.
An external explanation or interactive activity to use alongside the lesson. It may include extension material.
Close the notes and answer from memory. Revisit any explanation you cannot yet reconstruct.
Test yourself
Answer a few questions, then review anything you missed.
Start with the quiz above to check the key ideas. You can also choose another topic from the practice library.