GCSE · Computer Science · Eduqas · Spec C500QS
Records
Your game account has a username, a password and a score, all belonging to one player. How does a program keep them together?
Computer Science · Designing a record
Design a record for one library book
Pick an item, then pick where it goes: which data type would that field hold, or is it not about this book at all?
Still to sort
String field (0)
Text: letters, words, symbols.
Where the line is: Data you would read as words. If it is written in quotes in a dictionary, it is a string.
Integer field (0)
A whole number, with no decimal part.
Where the line is: Counts and whole-number values. If it needs a decimal point, it is not an integer.
Real field (0)
A number that can have a decimal part.
Where the line is: Numbers like 7.99, where part of a whole matters.
Boolean field (0)
Only two possible values: true or false.
Where the line is: A yes-or-no fact about the book.
Not about this book (0)
It describes something else, so it does not belong in this record.
Where the line is: A record describes one entity. Data about another entity needs a different record.
The entity is one book. Each item is a possible field, shown with an example of its data.
Computer Science · Reading and updating a field
Call the output before the program shows it
Step through the program. At each marked step, call what comes next before it is shown. Nothing is run: every value is authored.
player = {"Username": "Mira_K", "Password": "7goatsEating", "Score": 8120}print(player["Username"])player["Password"] = "goalPost99"print(player["Score"])print(player["Password"])
Variables
Step 1. The record is built: three fields, each found by its key. This first step is done for you.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Keep everything about one thing together, then find each piece by its name.
What you need to know
- A data structure stores data in an organised and accessible way. A record is one example.
- A record stores a collection of attributes (data items) about a single entity: one object, place, person or thing.
- An attribute is a property or characteristic of the entity. Attributes are also called fields.
- Each field has a name and holds data, so a record holds the field names and the data stored in them.
- The fields of one record can hold different data types, for example strings and an integer together.
Have a goYour classmate Jo insists: "A record can't hold a username and a score together. One is text and the other is a number." Is Jo right?
No. The fields of one record can hold different data types.
Mixing types in one record is normal: a string field and an integer field can sit side by side, because each field has its own data type.
- Designing a record means choosing the entity, then deciding each field name and its data type.
Have a goYou are designing a record for one trading card. Name two fields for it and give each a data type.
For example Name (string) and Attack (integer).
Choose the one thing the record describes first, then give each of its properties a name and a data type that fits its data.
- Python has no native record data structure. A dictionary can be used to represent one.
- A dictionary is data pairings found by a key. For a record, each key is a field name paired with its data.
- Python writes a dictionary in curly brackets, with a colon between each key and its data.
- Read a field by naming its key, not by a position. Assigning to one key updates only that field.
Have a goSam says pet[1] gets the age out of pet = {"Name": "Biscuit", "Age": 4}, because Age is the second thing. What would you write instead?
pet["Age"]
A field is found by naming its key, not by counting along to a position number.
The big picture
A record groups named fields about one entity. Python has no built-in record, so a dictionary stands in: each key is a field name, paired with that field's data. You read a field by naming its key, and updating one field leaves the others alone.
Key points
Worked example
Problem
A hotel needs a record for one room: room number 12, type double, on floor 1. Design the record, write it as a Python dictionary, then change the type to family.
⚠ Watch out
Thinking a field is found by its position, or that changing one field rewrites the whole record. A field is found by naming its key, and assigning to one key changes only that field's data.
Memory hook
Think of a form with labelled boxes. The label (the key) tells you which box, so the order of the boxes never matters. Fill in one box and the others stay as they were.
Check yourself
Pick any entity from your life. Name its fields and their data types, write it as a dictionary, then say what happens to the other fields when you update one.
Flashcards
(12)What is a data structure?
What is a record?
What is an entity?
What is an attribute?
What does a record actually hold?
Can one record mix data types?
What do you decide when you design a record?
Does Python have a native record?
In a dictionary that represents a record, what is a key?
How is a dictionary written in Python?
How do you read one field's data from a dictionary record?
What happens to the other fields when you assign a new value to one key?
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.