GCSE · Computer Science · AQA · Spec 8525

Fields

Every table heading hides a whole column of data. Get that straight, and two quick questions reveal the job of any field.

Computer Science · Databases

Give every field its job

Pick a field. Then answer Question 1 (does it hold another table's primary key values?). Only if the answer is no, answer Question 2 (is its value different for every record?).

The field → Question 1 → Question 2

6 routes a field can take.

On Choose a field from Pupils or Tutors. 6 branches to choose from.

Two linked tables. Pupils: Pupil ID (P01 to P05), Surname (Smith, Patel, Smith, Jones, Patel), Year group (9, 9, 10, 9, 10), Tutor ID (T1, T2, T1, T3, T1). Tutors: Tutor ID (T1, T2, T3), Department (Maths, English, Maths). Each heading is a field, and each field is a whole column.

Exam line: Question 1: does the field hold another table's primary key values? Question 2: is its value different for every record?
Watch out: A foreign key is not a second primary key. Its values can repeat.

Predict, then check

Look at the Pupils table above before you commit.

The Pupils table has the headings Pupil ID, Surname, Year group and Tutor ID. One row reads: P01, Smith, 9, T1. Sam points at the word 'Smith' and says, 'That's a field.' Which of these really is a field?

Computer Science · Databases

Name or data type: who does what?

A pupil is looking at a field called Year group in the Pupils table and describing how fields work.

Which is closest to what you think right now?
How sure are you?

Computer Science · Databases

Check this explanation

A student explains how the Tutors and Pupils tables are linked. One line goes wrong. Which one?

A student's explanation — which line goes wrong?

Exam line: A foreign key's values can repeat, because many records can link to the same record in the other table.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

What a field is, and the two questions that reveal its job

What you need to know

  • A field is one attribute stored for every record, so it is a whole column, not a single box in the table.
  • Every record has its own value in each field: 'Smith' is one value in the Surname field, and the row about Smith is a record.
  • Have a goSam counts a table with 4 fields and 30 records and says, 'That's only 4 bits of data.' Gently correct Sam: how many values are stored?

    120 values: each of the 30 records has a value in each of the 4 fields.

    A field is stored for every record, so Sam counted columns, not the values stored in them.

  • A field has a name that identifies it. The name labels the column and is not one of the data values.
  • A field also has a data type, which sets what kind of data it holds. It applies to every record.
  • Have a goA field is called Year group and the table treats its entries as numbers. Which part of the field says that: its name or its data type?

    Its data type.

    The name only identifies the field; the data type sets what kind of data it holds.

  • A primary key is a field whose value is different for every record, so each value identifies exactly one record.
  • A foreign key is a field that holds primary key values from another table. That is how the two tables link.
  • A foreign key's values can repeat, because many records can link to the same record in the other table.
  • Have a goFive pupils all have the same tutor, T2. How many times does T2 appear in the Tutor ID foreign key field of Pupils?

    Five times, once for each pupil's record.

    A foreign key's values can repeat because many records can link to the same record in the other table.

  • To find a field's job, ask two questions: does it hold another table's primary key values? If not, is every value different?
  • A field that is neither a primary key nor a foreign key is an ordinary field.

The big picture

A field is one attribute stored for every record, shown as a column with a field name and a data type. Two questions then decide a field's job: does it hold another table's primary key values (foreign key), and if not, is its value different for every record (it can be the primary key)? A field that is neither is an ordinary field.

Key points

1A field is a column: one attribute, with a field name and a data type, and a value for every record.
2A primary key is different for every record. A foreign key holds another table's primary key values and may repeat.
3Any field that is neither is an ordinary field.

Worked example

Problem

A Books table has three fields. Book ID: B1, B2, B3, B4. Genre: Crime, Crime, Poetry, Crime. Shelf ID: S1, S2, S1, S1, where S1 and S2 are primary key values of a Shelves table. Decide the job of each field.

⚠ Watch out

Thinking a foreign key must be unique, like a primary key. Different for every record is the primary key's rule; a foreign key's values repeat whenever several records link to the same record in the other table.

🧠

Memory hook

Two questions for every field: someone else's key? Different every time?

✓

Check yourself

In a Cars table, Owner ID holds primary key values from an Owners table, and cars share owners. What kind of field is it, and why?

Flashcards

(9)
What is a field?
One attribute stored for every record, shown as a column with a field name and a data type.
In a Surname column, what is 'Smith'?
A value: one record's entry in the Surname field. The row about Smith is a record.
What does a field name do?
It identifies the field. It labels the column and is not one of the data values.
What does a field's data type do?
It sets what kind of data the field holds, and it applies to every record, not one record at a time.
What is a primary key?
A field whose value is different for every record, so each value identifies exactly one record.
What is a foreign key?
A field that holds primary key values from another table, which links the two tables.
Why can a foreign key's values repeat?
Many records can link to the same record in the other table, so the same value appears more than once.
What two questions decide a field's job?
Does it hold another table's primary key values? If not, is its value different for every record?
What is an ordinary field?
A field that is neither a primary key nor a foreign 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 posted

More AQA GCSE Computer Science topics

See the full AQA Computer Science curriculum →

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.