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

Preview

AESP task 3: Split a flat table into three tables

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

80 minutes

Maya moves house

Maya Ford has bought three things. Her town is stored on every row. She moves, and the shop must change it in three places.

If it misses one, Maya lives in two towns at once. Splitting the table stops that. Each fact is stored once.

Key words

WordWhat it meansExample
Attributeone fact about an entity, such as a name
Normalisationsplitting tables so that each fact is stored once
Redundancythe same fact stored in more than one place
Primary keyan attribute whose value is different for every row
Composite keya primary key made of two or more attributes together
Foreign keyan attribute that holds the primary key of another table
Dependencywhen one attribute is decided by anothera name is decided by its id
Databasean organised collection of data, kept in linked tables
SQLa language for asking questions of data kept in tables

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

By the end of this lesson

Note

I can take a flat table to third normal form, choose the keys, and say what each step removes.

Starter

Have a go

Starter

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.

This is practice

Important

The real task comes from the exam board. This lesson uses an invented organisation and its own made-up data. Your teacher tells you how the real tasks are set and what you may bring.

Worked example: the flat table

saleitemcustomertownitem namepriceqty
1B011 Maya FordHillsideBread1202
1M021 Maya FordHillsideMilk901
2B012 Ben LoweMarsh RowBread1201
3M021 Maya FordHillsideMilk903
3T051 Maya FordHillsideTea2501

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

Spot the repeats

Have a go

Spot the repeats

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

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