GCSE · Computer Science · AQA · Spec 8525
Database tables
Picture a school office that has to find any pupil's details in seconds. A computer does it with a table. Let's take one apart and see the rules it follows.
Computer Science · Databases
Layers
Explore
tap a part of the table
Peeled on: the data type of each field sits above its field name.
Tap a part of the table to see what it is. Peel the data types on and off too.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
One type of thing per table, one record per row, one field per column.
What you need to know
- A database stores its data in tables. Each table holds data about one type of thing, such as pupils. That type of thing is the entity.
- Each row is one record: everything the table stores about one pupil.
- Each column is one field: one kind of detail, like surname, that every record has.
Have a goA school wants to record every pupil's form group in the Pupils table. Do they add a new row or a new column?
A new column, which is a new field.
A row is a whole pupil, so a row would add another pupil; a new kind of detail for everyone is a new field.
- Each field has a field name, written at the top of its column, such as Surname.
- Each field also has a data type, such as integer, text or date. Every record uses that type for that field.
Have a goDev is sure it is fine to type 'ask me later' into one pupil's DateOfBirth, which is a date field. Is he right?
No. That record would hold text in a date field.
Data type belongs to the field, so every record has to use it; one record cannot choose its own.
- Every record has the same fields, with the same names and data types. No record gets fields of its own.
- The primary key is a field whose value is different in every record, so it picks out exactly one record.
- Choose a primary key that can never repeat. A key that repeats stops identifying one record.
Have a goA shop gives every customer a customer number. Why might that make a better primary key than the customer's full name?
A number can be different for every customer, but two customers could share a name.
A primary key has to be different in every record so that it picks out exactly one record.
- One database can hold several tables. They can be linked through a field they have in common.
The big picture
A database table holds data about one type of thing. Each row is a record and each column is a field. Every record has the same fields, with the same names and data types. The primary key is different in every record, so it identifies exactly one. A database can hold several tables, linked through common fields.
Key points
Worked example
Problem
A library wants a Books table. Decide what the table is about, its fields, their data types and its primary key.
⚠ Watch out
Thinking each record can have fields of its own, or its own data type for a field. They can't. A table is a grid with rules, so every record has the same fields with the same names and data types.
Memory hook
A column is like a pillar: it holds up one kind of detail all the way down. A row runs across like a line of people: one whole pupil. Pillar = field. Line = record.
Check yourself
A Teachers table has the fields TeacherID, Name, Subject and Room. Two teachers can both teach Maths. Which fields could repeat across records, and which field would make the best primary key?
Flashcards
(9)What does one table in a database hold data about?
In a table, what is a record?
In a table, what is a field?
What is a field name?
What is a data type?
Can one record have a field the other records don't?
What is a primary key?
What makes a field a poor primary key?
How can the tables in one database be linked?
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 AQA GCSE Computer Science topics
How this lesson was checked. This AQA GCSE Computer Science (specification 8525)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 9 October 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.