Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

AC 3.4: Choosing a data type

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

50 minutes

Why "10" comes before "9"

An analyst sorts a product list by item number. The list goes 1, 10, 100, 2, 3.

The computer is treating the numbers as words. In a word list, "10" comes before "2" because "1" comes before "2". The fix is to store the number as a number. This lesson is about choosing the right type.

Key words

WordWhat it meansExample
Data typeThe kind of value a field holds.Integer
IntegerA whole number.42
RealA number with a decimal point.21.5
CharacterOne letter, digit or symbol.Y
StringText made of characters.NOTEBOOK-07
BooleanTrue or false.True
DateA day, month and year.2026-10-28
BlobA large binary object such as a picture or a file, stored whole.A product photo

The cells students fill in are left blank in this preview.

By the end of this lesson

Note

I can choose the right type for a piece of data and explain why.

Starter: what you already know

Have a go

Starter: what you already know

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Numbers and truth values

An integer is a whole number: items in a basket, tickets sold. A real number has a decimal point: a price, a temperature, a download speed.

A Boolean holds only true or false. Use it for a yes or no, such as "is it in stock?".

Characters and strings

A character is a single letter, digit or symbol. A grade of "A" or a yes flag of "Y" is a character.

A string is text made of characters: a username, a product name, a stock code. A phone number is a string, because you never add phone numbers.

Dates and blobs

A date stores a day, month and year. It lets the computer sort by time and work out gaps, such as how many days an order has waited.

A Blob stores a large object, such as a photo, a PDF or a recording, as one whole item. You save and open a blob. You do not add it up.

Types in a product list

FieldExampleTypeWhy
Pack size24IntegerA whole count
Price3.99RealHas pence
Quality gradeBCharacterOne letter
Stock codeNOTEBOOK-07StringLetters, digits and a dash
In stockTrueBooleanYes or no
Added on2026-09-03DateLets us sort and count days
Photonotebook07.jpgBlobA whole picture file

The cells students fill in are left blank in this preview.

The lesson goes on

7 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.