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

Preview

SC 3.4: Common data types

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

45 minutes

Why "10" comes before "9"

A technician sorts the asset register by asset 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.

By the end of this lesson

Note

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

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.LAPTOP-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 screenshot

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

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: ports on a switch, tickets in a queue. 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 the account locked?".

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 room name, an asset tag. 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 a ticket has been open.

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 an asset register

FieldExampleTypeWhy
Ports24IntegerA whole count
Cost349.99RealHas pence
Condition gradeBCharacterOne letter
Asset tagLAPTOP-07StringLetters, digits and a dash
In serviceTrueBooleanYes or no
Bought on2024-09-03DateLets us sort and count days
Photolaptop07.jpgBlobA whole picture file

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

The lesson goes on

5 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.