Is an email address personal data?
Personal data is any information about a person who can be identified from it. A name counts, and so do an email address, a phone number and a photo.
Knowing what counts decides which rules apply to a database, and so how carefully you must look after it.
A shop that keeps 40 customer rows holds personal data in more columns than you might expect.
By the end of this lesson
Note
I can say whether a piece of data is personal data.
Key words
| Word | What it means | Example |
|---|---|---|
| Personal data | information about a person who can be identified | |
| Identifier | a detail that helps pick out one person | |
| Direct identifier | a detail that points at one person on its own | an email address |
| Indirect identifier | a detail that points at a person only with others | a birth year |
| Sensitive data | personal data that can cause serious harm if it leaks |
The cells students fill in are left blank in this preview.
Personal if a person can be found
The test has two parts. The data must be about a person, and that person must be identifiable from it.
Identifiable does not mean named. If you could work out who it is, using the data and other things you can reach, it is personal data.
Data protection law is written to protect the person the data is about.
Worked example: is it personal data?
| Value | Personal data? | Why |
|---|---|---|
| [email protected] | Yes | It names a mailbox that one person reads |
| A delivery address | Yes | It leads to one household |
| A phone number | Yes | It reaches one person |
| The number of orders in May | No | It is about the shop, not a person |
| The average price of a basket | No | Many people are folded into one number |
The cells students fill in are left blank in this preview.
Look at a real customer table
The lab holds an invented online shop with 40 customers. Open the terminal and press Run on the first two lines. They let you ask short questions.
Then count how many different values each column holds. A column where every value is different can point at one customer.
Accept the server's certificate
printf '[client]\nssl-verify-server-cert=0\n' > ~/.my.cnfShown here, not run. Create a free account to press Run and type it into your own lab’s terminal.
Make a short name for the shop
alias sql='mariadb -h db -u student -pstudent shop -t -e'Shown here, not run. Create a free account to press Run and type it into your own lab’s terminal.
Count the different values
sql "SELECT COUNT(*) AS customers, COUNT(DISTINCT email) AS emails, COUNT(DISTINCT city) AS cities FROM customers"Shown here, not run. Create a free account to press Run and type it into your own lab’s terminal.
Direct identifiers point at one person alone
The run above prints 40 customers, 40 different emails and 12 different cities. An email is different for every customer, so it is a direct identifier.
A city is shared by many customers, so on its own it is an indirect identifier. Put a city with a birth year and a job, and the group can shrink to one person.
Try it: how groups shrink
-- How many visitors share each city and birth year?
SELECT city, birth_year, COUNT(*) AS people
FROM visitors
GROUP BY city, birth_year
ORDER BY people, city;
-- A row with people = 1 points at one person.
-- Add job to SELECT and to GROUP BY, then run it again.
A common mistake
Warning
Many people think data without a name is not personal. A city, a birth year and a job can still pick out one person. If the data can be traced to one person, even with effort, it is personal data. Take the name out and you must still check.
Count the phone numbers
sql "SELECT COUNT(*) AS customers, COUNT(phone) AS phones FROM customers"Shown here, not run. Create a free account to press Run and type it into your own lab’s terminal.
Some personal data is sensitive
The run above prints 40 customers and 30 phone numbers, because COUNT skips NULL. Ten customers gave no phone number.
Some data is more risky than a phone number. Health, religion, political views, sexual life and ethnic origin can lead to unfair treatment if they leak.
Many data protection laws ask for extra care with these, and often a clear and explicit reason to collect them.