GCSE Computer Science · Databases, tables, keys and SQL queries
Relational databases and SQL
GCSE · AQA · OCR
Relational databases and SQL
Databases, tables, keys and SQL queries
Study Simplified revision slides
In this deck
Exam boardsAQAOCR
AQA: Full section: database concepts, keys, relationships, SQL SELECT/FROM/WHERE/ORDER BY, INSERT, UPDATE, DELETE, and queries across two tables.; OCR: SQL searching only (SELECT, FROM, WHERE, plus wildcards/LIKE); keys and INSERT/UPDATE/DELETE are AQA (verify LIKE wording against J277).
Tip: press T or tap Test me to hide the answers and quiz yourself.
Have a go first
What is a primary key?
A field that uniquely identifies each record. E.g. StudentID.
Guessing is fine. Trying before you revise helps it stick.
Key facts
Database
An organised collection of data stored so it can be easily searched and updated
Relational database
A database with separate linked tables, reducing data duplication
Table
Stores data about one type of entity in rows and columns
Record
A row in a table: all the data about one item
Key facts
Field
A column in a table: one attribute, e.g. Surname
Primary key
A field that uniquely identifies each record in a table
Foreign key
A field in one table that is the primary key of another table, used to link them
Data redundancy
Unnecessary repetition of the same data
Key facts
Data inconsistency
Different versions of the same data that do not match
SQL
Structured Query Language: a language for searching and managing databases
SELECT
SQL keyword listing the fields to return
FROM
SQL keyword naming the table(s) to search
Key facts
WHERE
SQL keyword giving the condition records must meet
ORDER BY
SQL keyword to sort results (ASC or DESC)
INSERT INTO
SQL command to add a new record
UPDATE ... SET
SQL command to change existing data
Key facts
DELETE FROM
SQL command to remove records
Wildcard *
Selects all fields, e.g. SELECT * FROM Students
Key terms
- Database
- An organised collection of data stored so it can be easily searched and updated
- Relational database
- A database with separate linked tables, reducing data duplication
- Table
- Stores data about one type of entity in rows and columns
- Record
- A row in a table: all the data about one item
- Field
- A column in a table: one attribute, e.g. Surname
- Primary key
- A field that uniquely identifies each record in a table
Quick check 1
What is a foreign key?
A field that is the primary key of another table, used to link tables. Foreign keys create relationships.
Quick check 2
Why are relational databases used?
To reduce data redundancy and inconsistency. Data is stored once and linked.
Teaching? Open in present mode. Swipe, use the arrow keys or tap the arrows. Download PDF opens your print window: choose "Save as PDF".
Relational databases and SQL: key facts
Everything on the slides, as a list you can read or print.
- Database
- An organised collection of data stored so it can be easily searched and updated
- Relational database
- A database with separate linked tables, reducing data duplication
- Table
- Stores data about one type of entity in rows and columns
- Record
- A row in a table: all the data about one item
- Field
- A column in a table: one attribute, e.g. Surname
- Primary key
- A field that uniquely identifies each record in a table
- Foreign key
- A field in one table that is the primary key of another table, used to link them
- Data redundancy
- Unnecessary repetition of the same data
- Data inconsistency
- Different versions of the same data that do not match
- SQL
- Structured Query Language: a language for searching and managing databases
- SELECT
- SQL keyword listing the fields to return
- FROM
- SQL keyword naming the table(s) to search
- WHERE
- SQL keyword giving the condition records must meet
- ORDER BY
- SQL keyword to sort results (ASC or DESC)
- INSERT INTO
- SQL command to add a new record
- UPDATE ... SET
- SQL command to change existing data
- DELETE FROM
- SQL command to remove records
- Wildcard *
- Selects all fields, e.g. SELECT * FROM Students
✓ Written by Study Simplified to the AQA · OCR GCSE Computer Science specification, and independently fact-checked against the official specification. Last reviewed 1 December 2026.
Study Simplified