Lesson 3 of 6
Lesson 3 — The Data Lifecycle: Collect, Store, Retain, Delete
Data has a birth, a working life and a death. Companies get fined for skipping the last part.
Learn it
The lifecycle is: collect → store → use → share → archive → delete. Every stage needs a rule.
A retention schedule says how long each type of record is kept and what triggers deletion.
Deleting means really deleting — including backups, logs, analytics copies and that spreadsheet on someone's laptop.
Key terms
- Retention schedule
- A documented list of how long each record type is kept.
- Crypto-shredding
- Destroying the key so encrypted data can never be read again.
- SAR
- Subject Access Request — a person asking for a copy of their data.
- Right to erasure
- The right to have personal data deleted in certain circumstances.
- Shadow copy
- An unmanaged duplicate of data (export, backup, log, laptop file).
Trace one email address
A user signs up, then two years later asks to be deleted. Where does their email actually live?
- 1Production DB: users table — easy to delete.
- 2Analytics: Event pipeline stored the email as a user property — needs a deletion API call.
- 3Email provider: The marketing tool holds a contact record — must be purged too.
- 4Logs & backups: Server logs and nightly snapshots contain it — apply log retention limits and crypto-shredding.
A retention job
sql-- Delete support tickets closed more than 2 years ago
DELETE FROM support_tickets
WHERE status = 'closed'
AND closed_at < now() - interval '2 years';
-- Anonymise old orders instead of deleting (tax law needs the totals)
UPDATE orders
SET customer_email = NULL,
customer_name = 'REDACTED',
ship_address = NULL
WHERE created_at < now() - interval '7 years';Sometimes you must keep the record for law but remove the personal parts — that is anonymising for retention.
Try it
Put the data lifecycle stages in order.
- 1Archive when inactive
- 2Use and share under rules
- 3Delete or anonymise on schedule
- 4Store securely
- 5Collect with a purpose
Challenge
Design a deletion process for a streaming service when a user asks to be forgotten. List every place their data lives and how each one is handled — including things you cannot legally delete.
Pick whichever way suits you — every mode earns the same bonus XP.
Write at least 40 more characters to submit.
Mark your own work
Guided walkthrough — 0/3 clues revealed
- Clue 1 locked — reveal it only if you get stuck.
- Clue 2 locked — reveal it only if you get stuck.
- Clue 3 locked — reveal it only if you get stuck.
Each clue costs 5 XP (never below 22 XP). You'd earn 43 XP right now.