Table: stores data about one entity (e.g. Students, Books, Orders). A database can have many tables. Record: one row in a table — holds all data about one individual item. Field: one column — holds a specific piece of data (e.g. Name, Age, Email). Each field has a data type.
StudentID
Name
Age
Form
1001
Alice
15
10A
1002
Ben
16
11B
↑ Primary Key
↑ Field
← Record (row)
Primary Key & Relationships
Uniquely Identifying Records
Primary key: a field (or combination) that uniquely identifies each record. No two records can have the same primary key. e.g. StudentID, ISBN, NationalInsuranceNumber.
Foreign key: a field in one table that links to the primary key in another table — creates a relationship between tables. Avoids duplicating data.
Example: an Orders table has a CustomerID field (foreign key) that links to the primary key in the Customers table
Queries, Forms & Reports
Getting Data Out of a Database
Query: a question posed to the database that retrieves specific records meeting stated criteria. Written in SQL or created visually. e.g. "show all students in form 10A aged 15"
Form: a user-friendly interface for inputting or viewing one record at a time — hides the raw table
Report: formatted, printable output from a database — often summarises query results for users
Exam Practice
Have a go at this question
Cambridge IGCSE 0478 style
A library stores information about books in a database. Describe a suitable primary key for the Books table and explain why a field such as "Title" would not be a good choice as a primary key.
3 marks
A suitable primary key is ISBN — it is unique to every book edition [1]. Title is not suitable because two books can have the same title [1], so it would not uniquely identify each record [1].
Key Takeaways
What to Remember
Table: data about one entity; Record: one row; Field: one column with a data type
Primary key: uniquely identifies each record — no duplicates, no NULLs
Foreign key: links one table to another — avoids data duplication
Query: retrieves specific data; Form: data entry interface; Report: formatted printable output