Use of Records to Store Data (AQA GCSE Computer Science): Revision Notes
Use of records to store data
What are records?
A record is a special type of data structure that lets you store multiple pieces of related information together in one place. Think of it like a digital filing system where each record is like a folder that contains several labelled compartments for different types of information.
The filing system analogy is particularly helpful: just as you might have a physical folder labelled "Student Information" with separate compartments for name, address, and contact details, a record provides the same organised structure in digital form.
Records are incredibly useful because they allow you to group related data items and give each piece of information a meaningful name, called a field name. This makes your data much more organised and easier to work with than storing individual pieces of information separately.
Understanding field names
Field names are like labels that identify each piece of information stored within a record. When you create a record, you first need to decide what field names you want to use. These field names should be descriptive and make it clear what type of information they will contain.
For example, if you were creating a record to store information about a student, you might choose field names such as:
- FirstName
- Surname
- YearGroup
Worked Example: Choosing Field Names
When designing a record for a library book system, consider what information you need:
- BookTitle (for the book's name)
- Author (for who wrote it)
- ISBN (for the unique identifier)
- PublicationYear (for when it was published)
- Available (for whether it's currently in stock)
Each field name clearly indicates what data it will contain.
Each field name acts as a unique identifier, making it easy to find and access specific pieces of information later.
Using records in database systems
Records are commonly used in database management systems to organise information efficiently. When you store records in a database, they are typically displayed in a table format, where each row represents one complete record and each column represents a different field.

The image above demonstrates how student records appear in a database table. Notice how the organised structure makes it easy to scan for specific information or compare data across multiple students.
This table shows how student records might be stored in a database. Each row contains all the information for one student, organised under the appropriate field names. This structure makes it easy to search for specific students or update their information.
Creating record structures
Before you can use records in a programme, you need to define their structure. This involves specifying what field names the record will have and what type of data each field will store.
Here's how you would define a record structure for storing student information:
RECORD Student
FirstName: String
Surname: String
YearGroup: Integer
Email: String
ENDRECORD
Let's break down this structure:
- RECORD Student - This starts the definition and gives the record a name
- Each line inside defines a field name and its data type
- String is used for text information like names and email addresses
- Integer is used for whole numbers like year groups
- ENDRECORD - This marks the end of the record definition
The record structure must be defined before you can create any actual records. Think of it as creating a template that all records of this type will follow.
Data types in records
When defining records, you need to specify the data type for each field. This tells the computer what kind of information to expect:
- String - For text information (names, addresses, emails)
- Integer - For whole numbers (ages, year groups, quantities)
- Boolean - For true/false values
- Real/Float - For decimal numbers (prices, measurements)
Choosing the correct data type is important because it affects how the data can be used and processed by your programme. For example, you can perform mathematical operations on Integer fields but not on String fields.
Benefits of using records
Records offer several advantages when organising data:
- Organization - Related information is kept together in one structure
- Clarity - Field names make it obvious what each piece of data represents
- Efficiency - Easy to access specific information using field names
- Consistency - All records of the same type have the same structure
- Scalability - Easy to add new records or modify the structure when needed
These benefits make records an essential tool for managing data in both simple programmes and complex database systems.
Key Points to Remember:
- Records group related data together using descriptive field names to identify each piece of information
- Field names act like labels that make it easy to find and access specific data within a record
- Record structures must be defined first before you can create and use records in your programmes
- Data types specify what kind of information each field can store (String, Integer, Boolean, etc.)
- Records are commonly used in databases where they appear as rows in tables with field names as column headers