---
title: "Databases | FiveStudy"
description: "Design one-table data storage, select field types and a primary key, then read and write the required SQL subset."
url: https://fivestudy.com/guides/igcse-computer-science-databases
---

[IGCSE Computer Science](https://fivestudy.com/igcse-computer-science) · Study guide

# Databases

[Figure: FiveStudy logo]

FiveStudy

IGCSE Computer Science · Topic 9

IGCSE Computer Science · Comprehensive Guide 9

# Topic 9 · *Databases*

Design one-table data storage, select field types and a primary key, then read and write the required SQL subset.

4 lesson sections · 4 worked applications · Paper 2 · Cambridge 0478 (2026–2028)

Prerequisite check

Data types, validation, comparison operators, and ordered tabular data.

Exam reasoning lens

This is a single-table syllabus. Trace the actual rows and output order instead of describing a query only in general terms.

Requirements →Fields · records →Types · validation →Primary key →SQL output

## In this guide

1. Single-table Databases
2. Database Data Types
3. Primary Keys
4. SQL Queries

Topic 9 · Section 1

## Single-table Databases

The defining description of **single-table database** is “stores all required records in one table.” Connect it with **field**, whose role is “one attribute or category stored for every record.”

### Required vocabulary and boundaries

| Idea | Precise role | Evidence or example |
| --- | --- | --- |
| **single-table database** | stores all required records in one table | one Students table |
| **field** | one attribute or category stored for every record | DateOfBirth |
| **record** | all field values about one item or entity | one student's row |
| **data requirement** | states what values must be stored and used | store each product's code and price |
| **database validation** | checks whether entered field data is sensible and follows rules | range check on a mark field |
| **table definition** | selects fields, data types, validation, and a suitable primary key | designing a membership table |

### Four-step exam routine

**1**

Identify the exact clue and name **single-table database** only when its defining role fits.

**2**

State the mechanism or boundary: one attribute or category stored for every record.

**3**

Apply the idea to evidence such as “one student's row.”

**4**

Reject the tempting error that is chosen after the table is built.

Method and reasoning

### Reason Before Naming

These terms are usually assessed through short scenarios, so the mark often comes from matching the clue rather than recalling a definition alone.

Start by underlining the clue in the scenario, then decide what job that clue is describing. This keeps the answer tied to the concept being assessed.

**Answer pattern**
table is the best match when the scenario clue is 'store member details'.

| Scenario clue | What it proves |
| --- | --- |
| store member details | table |
| store one detail type | field |
| store one member | record |
| reject bad input | validation |

Worked application

### When The Scenario Is Less Obvious

The question may include a boundary case or a tempting wrong answer. Use the exact role in the scenario as evidence.

- **database**: organised collection of data
- **table**: grid of related data
- **field**: column storing one category of data
- **record**: row storing all data for one item
- **validation**: automatic check on input data

A strong answer names the idea, quotes or paraphrases the clue, and explains the link in one sentence.

| Term | Use in this lesson |
| --- | --- |
| database | organised collection of data |
| table | grid of related data |
| field | column storing one category of data |
| record | row storing all data for one item |
| validation | automatic check on input data |

Boundary and misconception

### A Common Mix-Up

A common mistake is stopping at a broad Single-table Databases word instead of proving the answer from the clue.

**Fix:** Underline the clue first, then choose the term that explains that exact clue.

| Mistake | Correction |
| --- | --- |
| A common mistake is stopping at a broad Single-table Databases word instead of proving the answer from the clue. | Underline the clue first, then choose the term that explains that exact clue. |

**Common mistake**

A student may claim that contains only field names. Repair it by stating that selects fields, data types, validation, and a suitable primary key.

**Check your understanding**

Which idea fits “range check on a mark field,” and what does it do?

**Show answer**

**database validation**: checks whether entered field data is sensible and follows rules.

Topic 9 · Section 2

## Database Data Types

The defining description of **text/alphanumeric** is “stores letters, digits, and symbols not used for arithmetic.” Connect it with **character**, whose role is “stores one character.”

### Required vocabulary and boundaries

| Idea | Precise role | Evidence or example |
| --- | --- | --- |
| **text/alphanumeric** | stores letters, digits, and symbols not used for arithmetic | product code A104 |
| **character** | stores one character | grade 'A' |
| **database Boolean type** | stores TRUE or FALSE in a field | Paid |
| **database integer type** | stores whole numbers in a field | Quantity 12 |
| **database real type** | stores a field number with a fractional part | Mass 4.75 |
| **date/time** | stores a calendar date and/or time value | appointment timestamp |

### Four-step exam routine

**1**

Identify the exact clue and name **text/alphanumeric** only when its defining role fits.

**2**

State the mechanism or boundary: stores one character.

**3**

Apply the idea to evidence such as “Paid.”

**4**

Reject the tempting error that stores 12.75 exactly.

Method and reasoning

### Reason Before Naming

These terms are usually assessed through short scenarios, so the mark often comes from matching the clue rather than recalling a definition alone.

Start by underlining the clue in the scenario, then decide what job that clue is describing. This keeps the answer tied to the concept being assessed.

**Answer pattern**
real is the best match when the scenario clue is 'store price'.

| Scenario clue | What it proves |
| --- | --- |
| store price | real |
| store stock count | integer |
| store member status | Boolean |
| store phone number | text/string |

Worked application

### When The Scenario Is Less Obvious

The question may include a boundary case or a tempting wrong answer. Use the exact role in the scenario as evidence.

- **text/string**: letters, digits, or symbols treated as text
- **integer**: whole number
- **real**: decimal number
- **Boolean**: TRUE or FALSE value
- **date/time**: calendar date or clock time

A strong answer names the idea, quotes or paraphrases the clue, and explains the link in one sentence.

| Term | Use in this lesson |
| --- | --- |
| text/string | letters, digits, or symbols treated as text |
| integer | whole number |
| real | decimal number |
| Boolean | TRUE or FALSE value |
| date/time | calendar date or clock time |

Boundary and misconception

### A Common Mix-Up

A common mistake is stopping at a broad Database Data Types word instead of proving the answer from the clue.

**Fix:** Underline the clue first, then choose the term that explains that exact clue.

| Mistake | Correction |
| --- | --- |
| A common mistake is stopping at a broad Database Data Types word instead of proving the answer from the clue. | Underline the clue first, then choose the term that explains that exact clue. |

**Common mistake**

A student may claim that should always be plain text. Repair it by stating that stores a calendar date and/or time value.

**Check your understanding**

Which idea fits “Mass 4.75,” and what does it do?

**Show answer**

**database real type**: stores a field number with a fractional part.

Topic 9 · Section 3

## Primary Keys

The defining description of **primary key** is “a field whose value uniquely identifies each record.” Connect it with **unique**, whose role is “no two records share the same primary-key value.”

### Required vocabulary and boundaries

| Idea | Precise role | Evidence or example |
| --- | --- | --- |
| **primary key** | a field whose value uniquely identifies each record | StudentID |
| **unique** | no two records share the same primary-key value | membership number |
| **non-null** | every record must have a primary-key value | each product has a ProductID |
| **stable identifier** | less likely to change than descriptive personal data | CustomerID instead of surname |
| **unsuitable key** | can duplicate, change, or be missing | first name |
| **record retrieval** | uses a primary-key value to locate one exact record | find OrderID 8274 |

### Four-step exam routine

**1**

Identify the exact clue and name **primary key** only when its defining role fits.

**2**

State the mechanism or boundary: no two records share the same primary-key value.

**3**

Apply the idea to evidence such as “each product has a ProductID.”

**4**

Reject the tempting error that uses a person's age.

Method and reasoning

### Reason Before Naming

These terms are usually assessed through short scenarios, so the mark often comes from matching the clue rather than recalling a definition alone.

Start by underlining the clue in the scenario, then decide what job that clue is describing. This keeps the answer tied to the concept being assessed.

**Answer pattern**
primary key is the best match when the scenario clue is 'identify one record'.

| Scenario clue | What it proves |
| --- | --- |
| identify one record | primary key |
| choose from possible keys | candidate key |
| unique only when combined | composite key |
| avoid duplicates | unique values |

Worked application

### When The Scenario Is Less Obvious

The question may include a boundary case or a tempting wrong answer. Use the exact role in the scenario as evidence.

- **primary key**: field that uniquely identifies each record
- **candidate key**: field that could be chosen as a primary key
- **composite key**: key made from two or more fields
- **unique**: not repeated in the table

A strong answer names the idea, quotes or paraphrases the clue, and explains the link in one sentence.

| Term | Use in this lesson |
| --- | --- |
| primary key | field that uniquely identifies each record |
| candidate key | field that could be chosen as a primary key |
| composite key | key made from two or more fields |
| unique | not repeated in the table |

Boundary and misconception

### A Common Mix-Up

A common mistake is stopping at a broad Primary Keys word instead of proving the answer from the clue.

**Fix:** Underline the clue first, then choose the term that explains that exact clue.

| Mistake | Correction |
| --- | --- |
| A common mistake is stopping at a broad Primary Keys word instead of proving the answer from the clue. | Underline the clue first, then choose the term that explains that exact clue. |

**Common mistake**

A student may claim that always returns many records. Repair it by stating that uses a primary-key value to locate one exact record.

**Check your understanding**

Which idea fits “first name,” and what does it do?

**Show answer**

**unsuitable key**: can duplicate, change, or be missing.

Topic 9 · Section 4

## SQL Queries

The defining description of **SELECT clause** is “states the field or aggregate values to return.” Connect it with **FROM clause**, whose role is “states the single table that supplies the records.”

### Required vocabulary and boundaries

| Idea | Precise role | Evidence or example |
| --- | --- | --- |
| **SELECT clause** | states the field or aggregate values to return | SELECT Name, Score |
| **FROM clause** | states the single table that supplies the records | FROM Students |
| **WHERE clause** | filters records using a condition | WHERE Score >= 70 |
| **AND and OR conditions** | require both filter conditions or at least one filter condition respectively | Age >= 16 AND Paid = TRUE |
| **ORDER BY** | sorts the query output in ASCENDING or DESCENDING order | ORDER BY Score DESCENDING |
| **SUM and COUNT** | return a total of numeric values or the number of matching records | SELECT SUM(Score) FROM Students or SELECT COUNT(*) FROM Students |

### Four-step exam routine

**1**

Identify the exact clue and name **SELECT clause** only when its defining role fits.

**2**

State the mechanism or boundary: states the single table that supplies the records.

**3**

Apply the idea to evidence such as “WHERE Score >= 70.”

**4**

Reject the tempting error that perform numeric addition.

Method and reasoning

### Reason Before Naming

These terms are usually assessed through short scenarios, so the mark often comes from matching the clue rather than recalling a definition alone.

Start by underlining the clue in the scenario, then decide what job that clue is describing. This keeps the answer tied to the concept being assessed.

**Answer pattern**
SELECT is the best match when the scenario clue is 'return Name'.

| Scenario clue | What it proves |
| --- | --- |
| return Name | SELECT |
| use Students table | FROM |
| Class = '10A' | WHERE |
| highest first | ORDER BY ... DESC |
| count rows | COUNT |

Worked application

### When The Scenario Is Less Obvious

The question may include a boundary case or a tempting wrong answer. Use the exact role in the scenario as evidence.

- **SELECT**: clause that chooses fields to return
- **FROM**: clause that names the table
- **WHERE**: clause that filters records
- **ORDER BY**: clause that sorts results
- **COUNT**: function that counts records

A strong answer names the idea, quotes or paraphrases the clue, and explains the link in one sentence.

| Term | Use in this lesson |
| --- | --- |
| SELECT | clause that chooses fields to return |
| FROM | clause that names the table |
| WHERE | clause that filters records |
| ORDER BY | clause that sorts results |
| COUNT | function that counts records |

Boundary and misconception

### A Common Mix-Up

A common mistake is stopping at a broad SQL Queries word instead of proving the answer from the clue.

**Fix:** Underline the clue first, then choose the term that explains that exact clue.

| Mistake | Correction |
| --- | --- |
| A common mistake is stopping at a broad SQL Queries word instead of proving the answer from the clue. | Underline the clue first, then choose the term that explains that exact clue. |

**Common mistake**

A student may claim that create a second linked table. Repair it by stating that return a total of numeric values or the number of matching records.

**Check your understanding**

Which idea fits “ORDER BY Score DESCENDING,” and what does it do?

**Show answer**

**ORDER BY**: sorts the query output in ASCENDING or DESCENDING order.

Paper 2 response lab

## Turn knowledge into marks

A high-quality response does more than recall a term. It selects the command word, states the exact role, follows the mechanism in order, and connects the effect to the scenario.

### Define precisely

For **single-table database**, begin with the defining role: stores all required records in one table. Do not replace the definition with an example.

### Describe a process

Use an ordered chain. Name what enters, what changes or is checked, and what result follows. A useful anchor here is “one student's row.”

### Apply or justify

Quote the scenario need, select **ORDER BY**, then link its role — sorts the query output in ASCENDING or DESCENDING order — to the required outcome.

### Repair a misconception

Do not accept the claim that create a second linked table. Replace it with the exact boundary: return a total of numeric values or the number of matching records.

### Mark-by-mark response ladder

1. **Name:** use the exact syllabus term.
2. **Role:** define what that term does or represents.
3. **Mechanism:** describe the relevant steps in their logical order.
4. **Context:** explain why that mechanism matters in the stated scenario.
5. **Boundary:** avoid claiming more than the method guarantees.

## Last-pass checklist

**Single-table Databases**single-table database — stores all required records in one table.

**Database Data Types**text/alphanumeric — stores letters, digits, and symbols not used for arithmetic.

**Primary Keys**primary key — a field whose value uniquely identifies each record.

**SQL Queries**SELECT clause — states the field or aggregate values to return.

Mapped to Cambridge IGCSE Computer Science 0478 · 2026–2028 syllabus, version 5

FiveStudy · IGCSE Computer Science · Topic 9

Guide 9 of 10
