Skip to content
VirtusAcademy

Relational Databases

FoundationHigherAQA

Practise Relational Databases for GCSE Computer Science with this free worksheet and full mark scheme — Foundation and Higher exam-style questions with worked answers for AQA GCSE Computer Science (8525). A relational database stores data in linked tables of records and fields, using primary keys.

Free downloads

These worksheets and mark schemes are original, written for Virtus Academy and checked against the current AQA specification. Every worksheet comes with a full mark scheme.

Topic overview

A relational database stores data in linked tables rather than one large table, which avoids repeating the same information.

Each table holds one type of entity — students, courses, books. A record is one row, and a field is one column. Every table has a primary key: a field that uniquely identifies each record, such as a student ID.

Tables are linked using a foreign key, which is a primary key from another table appearing as a field. This is what removes redundancy: instead of storing a teacher's full details against every one of their students, each student record holds only the teacher ID. Change the teacher's phone number once, and every student record reflects it immediately.

Revision notes

Tables, records and fields

A table holds one type of entity, such as students or courses.

A record is one row, holding all the data about one item. A field is one column, holding one attribute across all records.

Primary and foreign keys

A primary key uniquely identifies each record in a table, such as a student ID.

A foreign key is a primary key from another table appearing as a field, creating the link between tables. This is how relationships are represented.

Why relational structure helps

Storing a teacher's details against every student would repeat the same data many times.

With a foreign key, each student record holds only the teacher ID. Updating the teacher's phone number once updates it everywhere, and there is no risk of copies disagreeing.

Key points

  • A relational database uses linked tables.
  • A record is one row of a table.
  • A field is one column of a table.
  • A primary key uniquely identifies each record.
  • A foreign key links to another table's primary key.
  • Linking tables avoids repeating data.

Worked examples

Example 1

State what is meant by a primary key. [1 mark]

Working

A field that uniquely identifies each record in a tabledefine the term

Example 2

Explain how a foreign key links two tables. [2 marks]

Working

A foreign key is a field holding the primary key value from another tablestate what it is
so each record can be matched to the corresponding record in that other tableexplain the link

Example 3

Explain one advantage of storing data in linked tables rather than one large table. [2 marks]

Working

The same data does not need to be repeated in every record that refers to itstate the advantage
so updating it once updates it everywhere, and there is no risk of copies disagreeingexplain the benefit

Common mistakes

  • Confusing records and fields.

    A record is a row; a field is a column.

  • Saying a primary key can repeat.

    It must be unique for every record.

  • Getting the foreign key direction wrong.

    The foreign key holds another table's primary key value.

  • Not explaining why linking helps.

    Avoiding repeated data and inconsistent copies is the point.

Exam tips

  • Use record for row and field for column.
  • Say uniquely identifies when defining a primary key.
  • Explain foreign keys as holding another table's primary key.
  • Link the structure to avoiding repeated data.

Key terms

Relational database
A database storing data in linked tables.
Record
One row of a table.
Primary key
A field uniquely identifying each record.
Foreign key
A field holding another table's primary key.

Written and reviewed against the current AQA specification. Spotted an error? Let us know.