GCSE · Computer Science · Eduqas · Spec C500QS
File design
A telephone number is nothing but digits. So why would a careful designer refuse to store it as a number? Sort the fields below and find out.
Riverside Leisure Centre · Membership file
Which data type for which field?
Riverside Leisure Centre is designing its membership file. Pick each field, then choose the data type it should have. Commit before you read the reason.
Still to sort
Integer (0)
Whole numbers used for counting or arithmetic.
Where the line is: No fractional part. If the value could be 24.50, it is not an integer.
Real (0)
Values with a fractional part, such as prices or measurements.
Where the line is: A whole-number count is integer; a value that can have a fractional part, such as a price, is real.
String (0)
Text, and digit codes you never do arithmetic on or that may begin with a zero.
Where the line is: Looking like a number is not the test. Is it used in arithmetic, or could it start with a zero?
Character (0)
Exactly one character, such as a one-letter code.
Where the line is: If it can ever be more than one character, it is a string.
Boolean (0)
Only ever one of two values, such as true/false or yes/no.
Where the line is: Exactly two possible values. Three or more means it is not Boolean.
Date (0)
A calendar date.
Where the line is: If the field is a calendar date, store it as a date rather than as loose text or numbers.
Look at what the app does with each value, not what the value looks like.
Predict, then check
Riverside stores each member's date of birth. A new designer also adds an Age field.
Priya joins aged 14 and her record stores Age = 14. A year later nobody has edited her record. What has happened?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Start from the job the app has to do, then let that job decide every record, field, type and size.
What you need to know
- A file is an organised collection of related records, and a record holds all the data about one item.
- A field is one item of data in a record, such as a name or a price. Every record holds the same set of fields.
Have a goMaya says her record in the pupil file can have a 'favourite crisp flavour' field that no other pupil's record has. Can it?
No: every record in the file holds the same set of fields.
Her record can hold its own value in each field, but the fields themselves are shared, so the same kind of data is stored for every item.
- Start from the application's purpose, then keep one record per item and only the fields it needs.
- Usually leave out a field you can work out from other stored data, like age from date of birth.
- Each record needs a key field whose value is unique to that record, so it can be found without confusion.
Have a goTwo pupils in the school file are both called Sam Khan. Which part of a record lets the computer find the right one without confusion?
The key field.
Names can repeat between records. A key field is the one whose value is unique to each record.
- Pick each data type by how the value is used: integer, real, string, character, Boolean or date.
- Digit codes that are not used in arithmetic, or may begin with a zero, such as telephone numbers, are strings.
- A string's size is its maximum number of characters: long enough for the longest expected value, not wastefully longer.
- Text characters are commonly taken as one byte each. Add the field sizes for the record size, then multiply by the number of records.
Have a goA record has one string field of 10 characters and one integer field that is given 4 bytes. Taking one byte per character, how big is the record?
14 bytes.
The string needs 10 bytes (one per character); record size is found by adding all the field sizes, 10 + 4.
- Set the design out as a table of field name, data type, size and example, and justify each choice by how the data is used.
The big picture
A file is built from records, and each record is built from the same set of fields. Good file design starts from what the application must store, look up and output. It stores only what is needed and keeps one key field that is unique to each record. It chooses each data type by how the value is used, and sizes each field for its longest expected value. Record size is the sum of the field sizes, and file size is that multiplied by the number of records.
Key points
Worked example
Problem
Riverside's file from the example above holds 500 records of 38 bytes each. The centre now adds a Date joined field, given 4 bytes in this example. How much bigger does the file become?
⚠ Watch out
Choosing a data type because the value looks like a number, instead of asking how it is used. A telephone number is made of digits but is never added up and may begin with a zero, so it is a string.
Memory hook
Ask what the value DOES, not what it LOOKS like. If you would never add it up, it is not a number.
Check yourself
A cinema stores each customer's date of birth. A designer wants to add a stored 'Age' field as well. Say whether you would add it, and give the reason.
Flashcards
(15)What is a file in file design?
What is a record?
What is a field, and what does it have?
What do all the records in one file share?
Where does a file design start?
Which fields should a record hold?
Why is a field like age usually not stored when date of birth is?
What is a key field?
Which fields suit integer, and which suit real?
When is a string the right type for a digit code?
When are Boolean and character suitable?
Why choose a suitable data type?
How is a string field's size decided?
How are record size and file size estimated?
What does a file design table list for each field?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore Eduqas GCSE Computer Science topics
How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 16 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.