Module 3 · Where Data Lives

Why not just put everything in one big spreadsheet?

Lesson 3.2 · Why Tables Link Up

Felix · Rosa

Forty rows to fix. Six missed. One kid in two homerooms at once.

Felix finds the old gradebook the school used before the system.

One giant sheet. His name typed on every single grade, spelled three different ways.

When he moved homerooms, someone had to fix 40 rows and missed 6.

The short answer

Because every repeated fact is a chance to get it wrong, and a chance to miss it when it changes. Six missed rows put Felix in two homerooms at once. Linked tables store the homeroom once, and the mistake becomes impossible.

Try it yourself

Step through splitting the giant gradebook into two linked tables.

StudentHomeroomAssignmentGrade
Felix Ortiz204Quiz 188
Felix Ortez204Quiz 291
Felix Ortiz204Essay84
Felix Ortiz211Quiz 390

The giant sheet. Every grade carries the student’s name and homeroom again. Notice the spelling.

Step 1 of 5

What you just did has a name

Relational database

A set of tables that link to each other through IDs is a relational database.

Each fact lives in one place. Everything else points at it. The “relational” part is the pointing.

A few more things

Fix it once

Change Felix’s homeroom in one row and every grade, loan and lunch record is instantly right, because none of them ever stored the homeroom. They stored the ID.

Third normal form is the rule you just used

Splitting a wide sheet until no fact is stored twice is called normalizing it, and the rules come numbered. First normal form: one fact per cell, no lists crammed into a box. Second: every column describes the whole row’s ID. Third: and nothing else. Ms. Reyes described the homeroom, not the student, so she moved out. When someone at work says a table is “in third normal form,” that’s the whole claim. Every fact lives once, next to the ID it belongs to.

Joining tables back together

When you want the grade with the student’s name next to it, the database joins the two tables on the ID. It looks like one sheet for a moment, and then goes back to being two.

Go deeper

The longer version, if you want it.

SQL, and why analysts un-normalize on purpose

The language for asking a relational database questions is SQL. “Give me every grade for student 1042” is one short line, and a join is one more word in it. You won’t write any here, but now you know what the letters are for.

Analysts often go the other direction on purpose, joining tables back into one wide sheet for charting. That’s fine as a copy for analysis. The database itself stays normalized so updates happen once. The next lesson shows a warehouse doing exactly that, one step flatter, by design.

Quick check

A streaming app keeps a Shows table and a Watches table. Each watch stores the show’s ID, not its title. The show gets renamed. What has to change?

Let’s take it slower

Here’s the rule of thumb: never write down the same fact twice. If a teacher’s name appears on 200 rows, that’s 200 chances for a typo and 200 edits when she changes it. So you write the teacher down once, in her own table, give her a number, and let the 200 rows carry the number instead. That’s all “relational” means: tables that refer to each other by number. Each fact has one home. Everything else has the address.

More examples

1

A contact, not a phone number

Your phone stores each friend once, in Contacts, and your texts and calls point at that entry. When your friend gets a new number, you fix it once and every old thread still shows their name. Two tables, linked by an ID you never see.

2

The gamertag change

A game stores your account once, with an ID, and every match result points at that ID. Change your gamertag and your whole match history follows, because the matches never stored the name. Only the number.

Back to the question

So why not one big spreadsheet?

Show the answer

Because every repeated fact is a chance to get it wrong, and a chance to miss it when it changes. Six missed rows put Felix in two homerooms at once. Linked tables store the homeroom once, and the mistake becomes impossible.

More on this: What is a database?

One last question

Build the reason linked tables beat one giant sheet.

Tap the pieces in order. Tap one again to take it back.

…
Talk Card

Talk Card · 3.2

A relational database stores each fact once and links everything else to it with an ID. Fix the homeroom in one row and every grade follows.

Data to AI · pettigrewlab.com/learn

Next lesson