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 2: Spot faults in a data model

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

65 minutes

The total that is too big

A report says Sam paid in £70. Sam really paid in £35. Nothing is wrong with the data. The fault is in the calculation.

Clean data in a faulty model still gives wrong answers. Task 2 asks you to test both.

Key words

WordWhat it means
Requirementsomething the finished work must do
Modelthe tables, formulas and queries that turn data into answers
Joina link that puts rows from two tables side by side
Referencea pointer to a cell or a value, such as B4
Absolute referencea pointer that stays fixed when a formula is copied, written with $
Logic errora mistake in the rules, so the code runs but gives a wrong answer
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 test a model against its requirements, find common calculation faults and fix them with a reason.

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.

Run it: a join that repeats rows

Code: sql
SELECT m.name, SUM(d.amount) AS total
FROM member m
JOIN phone p ON p.member_ref = m.member_ref
JOIN deposit2 d ON d.member_ref = m.member_ref
GROUP BY m.name;

Why Sam shows £70

Sam has two phone numbers and two deposits. The join makes 2 times 2 rows, so each deposit is counted twice.

A good test is to compare against a total you can check another way. The whole table adds up to £75. The model said £110.

Real spreadsheets are used on site

Important

The real task may give you a spreadsheet. This platform has no spreadsheet, so the cells here are shown as a table with the formula written as text. Do the real spreadsheet work on site.

The lesson goes on

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