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.

8 of 8 still to sort.

Look at what the app does with each value, not what the value looks like.

Watch out: Digits do not automatically mean a number. Ask yourself: would the app ever do sums with this value?

Riverside Leisure Centre · What is inside a file?

Zoom from the file to one field

Level 1 of 3: The file

Predict first

Before you zoom in: the file is about members. What does ONE record hold?

  • Frames are not drawn to scale.
  1. The whole collection: an organised set of related records stored together for one application. Riverside's membership app has one file.

    • Holds one record for each member
    • Stored together for one application

Riverside Leisure Centre · Finding the right record

Which field should identify a record?

Riverside needs to find exactly one member's record every time, with no chance of landing on the wrong member. The designer has to choose how each record is identified.

Which of these is closest to what you think?
How sure are you?

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?

Riverside Leisure Centre · How big will the file be?

From field sizes to file size

Riverside expects 500 members. Each record holds Surname, Telephone, Monthly fee, Visits and Paid. The longest surname expected is 14 characters and the longest telephone number stored is 11 characters. Work out the size of the whole file.

  1. The file has one record per member, and each record has the same five fields.500 members means 500 records.
  2. missing step
Which line is step 2?

Your turn · Design a file

Design a file for a school library

A school library wants a file of book loans. The app must store each loan, look up one loan, and output the borrower's name and the date the book is due back. Design the file: say what one record is, name a key field, and give a field for the borrower's name and a field for the due date, each with a data type. Give a size for the name field, and a reason for its data type. [6 marks]

0 words · your answer stays on this page and is not sent anywhere.

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

1A file is made of records, and each record is made of the same set of fields.
2Choose each field's data type by how the value is used, not by how it looks.
3Give each record a key field with a value unique to that record.
4Size a string for its longest expected value; record size is the sum of field sizes, file size is record size times number of records.

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?
An organised collection of related records stored together for one application.
What is a record?
The set of data stored about one item or entity, such as one person, product or booking.
What is a field, and what does it have?
A single item of data within a record, such as a name or a price. Each field has a field name.
What do all the records in one file share?
The same set of fields, so the same kind of data is stored for each item.
Where does a file design start?
From the application's purpose: what it must store, look up and output.
Which fields should a record hold?
Every item of data the application needs about each item, and none it does not need.
Why is a field like age usually not stored when date of birth is?
It can be worked out from other stored data, so it is redundant and can become out of date.
What is a key field?
A field whose value is unique to each record, so each record can be identified and found without confusion.
Which fields suit integer, and which suit real?
Integer: whole numbers used in counting or arithmetic. Real: values with a fractional part, such as prices or measurements.
When is a string the right type for a digit code?
When the digits are not used in arithmetic or may begin with a zero, as in telephone numbers.
When are Boolean and character suitable?
Boolean: a field with only two possible values, such as yes/no. Character: a field holding a single character, such as a one-letter code.
Why choose a suitable data type?
It allows the right operations on the data, helps prevent unsuitable values being entered, and avoids wasting storage.
How is a string field's size decided?
The maximum number of characters it may hold: long enough for the longest value expected in normal use, but not so long that storage is wasted.
How are record size and file size estimated?
Add the sizes of all the fields for the record size, then multiply it by the number of records. Text is commonly taken as one byte per character.
What does a file design table list for each field?
Its field name, data type, size, and a description or example value. Each choice should be justified by how the data is used.

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 posted

More Eduqas GCSE Computer Science topics

See the full Eduqas Computer Science curriculum →

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.