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: Structure, type and transformation

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

One long line of text

A server writes this line: "2026-10-28 14:32 ERROR disk full".

To a person it says when, how bad and what. To a computer it is one long piece of text. To count the errors, you must first pull the pieces out and give each a type.

By the end of this lesson

Note

I can explain how layout, type and conversion work together, and choose well.

Key words

WordWhat it meansExample
Structured dataData in a fixed layout of fields.A table of tickets
Unstructured dataData with no fixed layout.A log line
Data typeThe kind of value a field holds.Integer
IntegerA whole number.42
StringText made of characters.LAPTOP-07
BlobA large object such as a photo, stored whole.A screenshot
ConvertTo change a value from one type to another.Text "12" to the integer 12
ExtractTo pull one piece out of a larger item.The level from a log line
LossyA change that throws some detail away.21.9 becomes 21

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.

Layout, type and conversion are linked

In structured data every field has its own data type. A date field holds dates and an integer field holds whole numbers. That is what makes it easy to sort and total.

Unstructured data is usually held as one string or one blob. It has no fields yet, so the computer cannot sort by part of it.

Changing type changes what you can do

To use unstructured data you extract pieces and convert each to a type. The text "14:32" becomes 872 minutes. Now you can add and compare.

Some changes are lossy. An integer cannot hold 21.9, so converting drops the .9. Some fail: "banana" cannot become an integer.

Check: layout, type and change

Have a go

Check: layout, type and change

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.

The lesson goes on

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