🗄️ Paper 1 · Topic 2: Data & Data Types
2.2b Records as a Data Structure
Edexcel 1CP2 · GCSE Computer Science · ~11 min read · 🔒 Pro
Notes
──
Video
──
Slides
──
Worksheet
──
Quiz

What is a Record?

A record is a data structure that groups together several related data items, each of which may have a different data type. A record is made up of fields.

  • Field: a single data item within a record (like a column in a table)
  • Each field has a name and a data type
  • A record represents one complete entity (e.g., one student, one product)

Example — Student Record:

Field nameData typeExample value
studentIDInteger10023
firstNameString"Aisha"
lastNameString"Khan"
dateOfBirthString"2009-05-14"
isPremiumBooleanTrue
gradeReal87.5

Records vs Arrays

FeatureArrayRecord
Data typesAll same typeCan be different types
Access byIndex (number)Field name
Use caseList of same itemsSingle entity with attributes
Examplescores[0..9]student.firstName

Records in Databases (Tables)

In a database, records are stored as rows in a table. Multiple records form a table:

studentIDfirstNamegradeisPremium
10023Aisha87.5True
10024James72.0False
10025Priya91.0True

Each row = one record; each column = one field.

Accessing Fields in Pseudocode

To access a field in a record, use dot notation:

  • student.firstName → accesses the firstName field
  • student.grade ← 92.0 → updates the grade field

In Edexcel pseudocode/Python, records can be represented using a dictionary or class.

Exam tip: Edexcel 1CP2 expects you to define what a record is, describe its fields and data types, and compare it to an array. Be able to design a record for a given scenario and identify appropriate data types for each field.
⚠️ Common Mistakes
  • Confusing a record (single entity) with a table (many records)
  • Saying all fields in a record must be the same data type — they can be different
  • Confusing an array (accessed by index) with a record (accessed by field name)
Video coming soon
Click slide or press arrow keys to navigate
✍️

Worksheet — 2.2b Records as a Data Structure

8 Edexcel-style questions · instantly marked

Q1Define the term 'record' in the context of data structures.[2]
✅ Mark scheme
A record is a data structure that groups together several related data items [1]; each item (field) can have a different data type [1].
Q2State what a 'field' is within a record.[1]
✅ Mark scheme
A field is a single named data item within a record, with its own data type [1].
Q3Design a record structure for a book in a library, including at least 4 fields with appropriate data types.[4]
✅ Mark scheme
Any 4 fields with appropriate name and data type, e.g.: bookID: Integer [1]; title: String [1]; author: String [1]; isOnLoan: Boolean [1]; price: Real [1] — award up to 4 marks.
Q4State two differences between a record and an array.[2]
✅ Mark scheme
Any two: records can have different data types, arrays must all be the same type [1]; records are accessed by field name, arrays by index [1]; records represent one entity, arrays store multiple items of the same type [1].
Q5In a database table with 500 students, what does each row represent?[1]
✅ Mark scheme
Each row represents one record (one student's data) [1].
Q6What notation is used to access a field within a record? Give an example.[2]
✅ Mark scheme
Dot notation [1]; e.g., student.firstName [1].
Q7Why might a programmer use a record to store product data rather than several separate variables?[2]
✅ Mark scheme
A record groups all related data together in one place [1]; making code more organised, readable and easier to pass all the data to a function [1].
Q8A record has fields: name (string), age (integer), height (real), active (boolean). How many different data types are used?[1]
✅ Mark scheme
4 different data types [1].
Topic Quiz
Q 1 of 15
You scored
out of 15
Click to reveal definition
🎉
Session complete!
TermDefinition
🎯

Mini Test — Records as a Data Structure

Timed exam-style test.

← 2.2a Variables & Data TypesTopic 2Next: 2.2c Files & Databases →
🔒

Unlock Pro

Subscribe to access all 59 Edexcel 1CP2 lessons.

£7.99/month
or £59/year