Before SQL · Episode 0.1

So... where is the data?

what is datadatabasetablerowcolumn
The story

Harry just started helping out at NOVA, a company that sells to customers all over the world. His first task from Hermione is small: “Pull up our customer list.”

Harry gets a login to something called “the database.” He expects a familiar spreadsheet. What he finds instead is a login screen, a list of unfamiliar words — tables, rows, columns, schemas — and no obvious file to open.

Harry

Okay… where’s the data?

Hermione

It’s here. It’s just not a spreadsheet. Let me show you what NOVA’s database actually looks like.

Harry's intuition
Harry

Why can’t this just be a spreadsheet? We already know how to use those.

Hermione

For a handful of rows, sure, a spreadsheet is fine. NOVA has millions of customers, and dozens of apps reading and writing to this data at the same time, every second. A spreadsheet falls over long before that — no safe way for two people to edit at once, no fast way to find one row out of millions, nothing stopping someone from typing a country name three different ways. A database is built to survive all of that.

What a database actually is

Strip away the jargon and it’s simpler than it sounds. A database is just an organized place to store data so it can be stored safely and found quickly. Inside it, data is organized into tables.

A table looks a lot like a spreadsheet tab: a grid with a fixed set of columns (the fields every record has — name, country, email…) and any number of rows (the actual records — one row per customer). Here’s NOVA’s real customers table, or at least the first 5 rows of it:

Result5 of 12 rows
idnamecountryemailphonesignup_date
1Alice SharmaIndiaalice@nova.io+91-98450-112232023-01-15
2Bob TurnerUSAbob@nova.io+1-202-555-01432023-02-20
3Chloe MartinFrancechloe@nova.ioNULL2023-03-05
4Diego FernandezBrazildiego@nova.io+55-11-98888-22222023-01-30
5Emma WilsonUKemma@nova.io+44-20-7946-09582023-04-11

NOVA’s database isn’t just this one table, either. There’s an orders table, an employees table, a products table — each one its own grid, and each one connected to the others. An order points back to the customer who placed it; that’s what makes this a relational database. We’ll get to how tables connect soon. For now, just get comfortable with one table at a time.

A database is a set of tables. A table is a grid: rows are records, columns are fields.

Check yourself

Before we touch any SQL: look at the table above. How many columns does customers have? And looking at all 12 real rows in NOVA’s table, how many customers are missing a phone number?

Check your answer

Six columns: id, name, country, email, phone, and signup_date. Three customers have no phone on file — Chloe, Farah, and Julia. That gap is completely normal in real data, and it’s going to matter a lot once we start asking SQL questions about it.

One thing to remember

A database is just organized tables — rows are records, columns are fields. SQL, which we’re about to meet, is simply how you ask questions about them.