GCSE · Computer Science · AQA · Spec 8525
Database tables
A school office needs any pupil's details in seconds, and a computer does it with a table. Let's pull one apart and see the rules it plays by.
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 keeps its data in tables. Each table is 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 goJay says: 'To store every pupil's form group, just add a row.' What should the school add, and what would Jay's row actually create?
A new column (a new field). Jay's row would create a brand-new pupil.
A row is one whole record, so Jay's row would add another pupil. A new kind of detail for everyone is a new field.
- Every field has a field name, written at the top of its column, such as Surname.
- Every field also has a data type, such as integer, text or date. All records use that type for that field.
- Every record has the same fields, with the same names and data types. No record gets extras of its own.
Have a goDev reckons it's fine to type 'ask me later' into one pupil's DateOfBirth, a date field. Is he right?
No. That record would hold text in a date field.
The data type belongs to the field, so every record uses it. One record can't pick its own.
- A table normally has a primary key: a field with a different value in every record, so it picks out exactly one.
- Pick a key that can never repeat. A key that repeats stops identifying one record.
Have a goA shop gives every customer a customer number. Why could that be a better primary key than the customer's full name?
A customer number can be different for every customer, but two customers could share a name.
A primary key must be different in every record. A number can be, but names can repeat.
- One database can hold several tables. In a relational database they are linked through fields they have in common.
The big picture
A 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 picks out exactly one. One database can hold several tables, linked through fields they have in common.
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 one record can have fields of its own, or its own data type for a field. It can't. A table is a grid with rules: every record has the same fields, with the same names and data types.
Memory hook
A column is a pillar: it holds up one kind of detail all the way down. A row is a line of people: one whole pupil, standing side by side. 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
(10)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?
Why is a field like Surname a poor primary key?
How are the tables in one relational database linked?
A table needs to store a new kind of detail for everything in it. What gets added?
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 26 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.