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

Free lesson

6.7 (3 of 3): Maintaining data: time, skills, cost

The whole lesson, free. Read it and have a go at the activities. To work the tasks and labs in the real lesson, press Start lab, with no account needed.

45 minutes

A quick check that you are not a bot, then your own lab opens on the interactive lesson.

Already have an account? Sign in

The gym that texts the wrong people

A small gym has 8 names on its member list. The owner sends a text: "Half price this month."

Two people get it twice. One person left the gym two years ago and is angry. One number is wrong, so a stranger gets the text.

Nobody looked after the list. How much work would it take? Is it worth it?

Key words

WordWhat it meansExample
MaintainTo keep data correct, up to date and useful.Fix a phone number.
Out of dateData that was true once but is not true now.A member who left
DuplicateA second copy of the same record.Sam Patel twice
ArchiveTo move old data to a safe place you rarely use.Members from 2022
SkillsWhat a person knows how to do.Writing a short program to check the list
RecordOne row of data about one thing.Sam Patel and his phone number
CostThe money something takes, including time and skills.£20 an hour of staff time
Six VsSix V words that describe data: volume (how much), velocity (how fast), variety (how mixed), variability (how it changes), veracity (how true), value (how useful).Velocity: new members every minute
PriorityWhat you do first because it matters most.Fix wrong phone numbers first.

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

Data does not look after itself

People move. Phone numbers change. Members leave. A list that was right in January is wrong by June.

To maintain data means to keep it correct, up to date and useful. It is work that never ends.

Quick check: looking after data

Have a go

Quick check: looking after data

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

Three things limit the work

Time: somebody must spend hours checking, fixing and deleting. Data comes in all the time, so the work comes all the time.

Skills: somebody must know how to do it. A person who cannot write a small program must find duplicates by hand.

Cost: time and skills cost money. Storage and tools cost money too.

Worked example: what does a check cost?

StepWorkingAnswer
Hours for one check3 hours3 hours
Checks in a year1 every month12 checks
Hours in a year3 x 12 (3 times 12)36 hours
Cost of one hourThe pay for a worker£20
Cost in a year36 x £20 (36 times 20)£720

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

Try it: find out of date records

Code: python
members = [
    ["Sam Patel", "2026-09-28"],
    ["Aisha Khan", "2026-10-02"],
    ["Leo Brown", "2024-11-14"],
    ["Mia Evans", "2026-09-30"],
    ["Tom Hughes", "2023-06-19"],
]

# Members whose last visit was before the start of 2025.
# A date written year-month-day can be compared as text.
for member in members:
    if member[1] < "2025-01-01":
        print(member[0], member[1])

# Change the date to "2026-01-01" and press Run again.

Make a free account to save your work and track your progress.

How it all fits together

You have met three groups of ideas.

The six Vs say what your data is like: big, fast, mixed, changing, true or useful. The quality checks are ways to test that data is good. They say what you can do about it. Time, skills and cost say what you can afford.

A good decision uses all three.

Three things, one decision

Three boxes, "The six Vs: what is the data like?", "Quality checks: what can we do?" and "Time, skills, cost: what can we afford?", each have an arrow into "What is worth doing?", which leads to "A plan: do this first, leave that for later".Three boxes, "The six Vs: what is the data like?", "Quality checks: what can we do?" and "Time, skills, cost: what can we afford?", each have an arrow into "What is worth doing?", which leads to "A plan: do this first, leave that for later".

Match the problem to the limit

Have a go

Loading…

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

Your turn: find the duplicates

The gym list has some members twice. Each member is a pair: the name and the phone number. Fill in two functions. The first counts the rows for one name. The second lists every name that is there more than once. Press Run Tests to check.

Code: python
def count_rows(members, name):
    # members is a list of pairs: [name, phone].
    # Give back how many rows have this name.
    return -1


def duplicates(members):
    # Give back a list of the names that are on the list more than once.
    # Each name appears once, in the order it first appears in members.
    return None

Make a free account to save your work, or press Start lab to work through the whole lesson.

Extra: Try it: duplicates in SQL

Code: sql
-- A real gym keeps its list in a database and asks it in SQL.
-- Which emails are on the list more than once?
SELECT email, COUNT(*) AS times
FROM members
GROUP BY email
HAVING COUNT(*) > 1
ORDER BY email;

-- Change email to name in all three places and run it again.

Make a free account to save your work and track your progress.

What is worth doing?

You cannot do everything. Ask three questions.

  1. How bad is the problem? Wrong phone numbers lose members. A spelling mistake does not.
  2. How much work is the fix?
  3. Is there a cheap fix that stops it happening again?

Do the big problems with a small fix first.

Options for the gym

OptionTimeSkillsCostFixes
Remove duplicates with a small programLowCoding neededLowDouble texts
Phone every member to check detailsHighNoneHighWrong numbers
Ask members to check their details onlineMediumWeb skillsMediumWrong numbers
Archive members who leftLowCoding neededLowTexts to old members
Do nothingNoneNoneNoneNothing

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

Quick check: judge it

Have a go

Quick check: judge it

4 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

Write your judgement

The gym owner has 4 hours a week to look after the list and no coding skills. Use the table of options. Do these steps.

  1. Choose two options.
  2. Say why you chose each one.
  3. Use the words time, skills and cost in your answer.
  4. Say which of the six Vs matters most here.

Write 4 to 6 short sentences.

A teacher marks this in a college. Nothing you write here is kept: it goes when you leave the page.

Make a free account to save your work, or press Start lab to work through the whole lesson.

Key words crossword

Have a go

Loading…

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

Watch: looking after the list

Press Play on the short film below. It follows the gym list, what keeping it in order costs, and how to choose what to do. Listen for the myth about doing everything.

Film: Maintaining data

Maintaining data: time, skills, cost

Every scene, as text

  1. The gym that texts the wrong people. "Half price this month." (sent to: 8 names on the list). Two people get it twice (duplicate: a second copy). One person left the gym two years ago (out of date: true once, not true now). One number is wrong, so a stranger gets the text.
  2. Data does not look after itself. People move. Phone numbers change. Members leave. Right in January, wrong by June. To maintain data: keep it correct, up to date and useful.
  3. Three things limit the work. Time (takes: hours of checking, fixing, deleting). Skills (needs: somebody who knows how). Cost (covers: time, skills, storage and tools).
  4. Worked example: what does a check cost? One check: 3 hours. 3 × 12 = 36 hours a year (checks in a year: 12, one a month). 36 × £20 = £720 a year (cost of one hour: £20).
  5. Three things, one decision. The six Vs: what is the data like? (velocity: one of the six, how fast). Quality checks: what can we do? Time, skills, cost: what can we afford? Each has an arrow into: What is worth doing? An arrow down to: A plan: do this first, leave that for later.
  6. Myth (false): you can do everything. That is not true: you cannot do everything. Do the big problems with a small fix first. Remove duplicates with a small program (fixes: double texts). Archive members who left (fixes: texts to old members; archive: a safe place you rarely use).

Final check

Have a go

Final check

5 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

Remember

Important

Keeping data in good order takes time, skills and money. Look at the six Vs, pick the quality checks that matter, and do the big jobs with small cost first.

Teach this lesson with your class

On a college account your students work the tasks and the labs as well, and every mark is kept for you.