Simplified
Simplified

L3.1What goes in a row?

YOU

What goes in a row?

contactsnamephone numberemailAAna555-0142ana@mail.comBBen555-0178ben@mail.comCCara555-0115cara@mail.coma row →↑ a column
Simplified's serveryour emailyour nameyour XPPostgres?
your Instagram profileusername: @yournamename: Youbio: Learning to codeyour Spotify accountemail: you@mail.comname: Youa friend's WhatsApp contactname: Leophone: 555-0142
usersemailnamexpada@simplified.orgAda120ben@simplified.orgBen40cy@simplified.orgCy0dee@simplified.orgDee300ada@simplified.orgAda120← one rowlessonstitleWhere your photo livesKinds of databaseTables?
row
one of the things a table holds: here, one learner
usersemailnamexpada@simplified.orgAda120ben@simplified.orgBen40cy@simplified.orgCy0dee@simplified.orgDee300ada@simplified.orgAda120← one rowlessonstitleWhere your photo livesKinds of databaseTables?
usersemailnamexpada@simplified.orgAda120ben@simplified.orgBen40cy@simplified.orgCy0dee@simplified.orgDee300eli@simplified.orgEli40fay@simplified.orgFaynew row0fay@simplified.org5 rows6 rows?
Postgresusersemailnamexpada@simplified.orgAda120ben@simplified.orgBen40⋮⋮⋮⋮⋮⋮2,000,000 rowsyour emailyour nameyour XPquerySimplified's serverLearnyour XPyour Learn page
usersemailnamexpada@simplified.orgAda120ben@simplified.orgBen40cy@simplified.orgCy0dee@simplified.orgDee300ada@simplified.orgAda120← one rowlessonstitleWhere your photo livesKinds of databaseTables?

Databases · Lesson 3.1

Tables

What goes in a row?

Simplified
0:00 / 2:24

A relational database keeps its data in tables of rows and columns, like your phone's contacts.

Simplified, the app you're learning on, keeps its data in a relational database called Postgres.

Postgres is a database: a program that keeps Simplified's data on disk, in tables.

When you signed up, Postgres stored your email and your name.

And each time you finish a lesson, it stores the XP you earn.

Simplified's serveryour emailyour nameyour XPPostgres?

So how does Postgres keep your email, your name and your XP together?

Well, think of your Instagram profile.

It keeps your facts together: your username, your name and your bio.

Your Spotify account does the same, with your email and your name.

And a friend's contact on WhatsApp keeps their name and phone number together.

Each one is one person's facts, kept together.

your Instagram profileusername: @yournamename: Youbio: Learning to codeyour Spotify accountemail: you@mail.comname: Youa friend's WhatsApp contactname: Leophone: 555-0142

Postgres keeps Simplified's learners the same way, in a table called users.

Each learner's email, name and XP sit together, on one line.

Like one contact in your contacts table, that line is a row.

A row is one of the things a table holds: here, one learner.

And a table holds one kind of thing, so users holds only learners.

Simplified's lessons are a different kind of thing, so they sit in a table of their own.

usersemailnamexpada@simplified.orgAda120ben@simplified.orgBen40cy@simplified.orgCy0dee@simplified.orgDee300ada@simplified.orgAda120← one rowlessonstitleWhere your photo livesKinds of databaseTables?

So what happens when a new learner signs up?

usersemailnamexpada@simplified.orgAda120ben@simplified.orgBen40cy@simplified.orgCy0dee@simplified.orgDee300eli@simplified.orgEli40fay@simplified.orgFaynew row0fay@simplified.org5 rows6 rows?

Say that early on, only five learners had signed up: Ada, Ben, Cy, Dee and Eli.

So users held five rows, one for each of them.

Then Fay signed up, with fay@simplified.org.

Simplified's server sent Postgres her email and her name, and Postgres stored them in one new row.

She hadn't finished a lesson yet, so her XP was 0.

So users then held six rows, one for each of its six learners.

And what happens when you open your Learn page on Simplified?

Postgresusersemailnamexpada@simplified.orgAda120ben@simplified.orgBen40⋮⋮⋮⋮⋮⋮2,000,000 rowsyour emailyour nameyour XPquerySimplified's serverLearnyour XPyour Learn page

Say Simplified has 2,000,000 learners, so users holds 2,000,000 rows.

One of those rows is yours.

Simplified's server sends Postgres a query, asking for your row.

Postgres finds it among the 2,000,000, and sends back that one row.

It holds your email, your name and your XP, all together.

So the XP on your Learn page came from your row.

So a table holds one kind of thing, like Simplified's learners.

And each row is one of them, with all of its facts kept together.

Example: What goes in a row?

Say Simplified's users table holds 6 rows, one for each learner. Then Jay signs up.

How many rows does users hold now?

Explanation

First, each learner has exactly one row in users.

Then, Jay is one new learner, so Postgres stores his facts in one new row.

Therefore, users holds 6+1=6 + 1 =6+1= 7 rows.

Question 1

Say Pinterest keeps its users in a table, one row for each user. The table holds 40 rows. Then 3 people sign up on Monday, and 5 more on Tuesday.

How many rows does the table hold now?

rows

Where a row meets a column

usersemailnamexpada@simplified.orgAda120ben@simplified.orgBen40cy@simplified.orgCy0dee@simplified.orgDee300ada@simplified.orgAda120← one rowlessonstitleWhere your photo livesKinds of databaseTables?
Sign upEmailNameusersemailnameada@simplified.orgAdaben@simplified.orgBency@simplified.orgCydee@simplified.orgDeeeli@simplified.orgElifay@simplified.orgFay
column
one fact that every row has, like email
usersid123456emailada@simplified.orgben@simplified.orgcy@simplified.orgdee@simplified.orgeli@simplified.orgfay@simplified.orgnameAdaBenCyDeeEliFayxp1204003004075created_at2026-01-052026-01-092026-02-142026-03-022026-03-202026-04-11?ada@simplified.org14022026-03-023
cell
one row's value for one column
usersidemailnamexpcreated_at1ada@simplified.orgAda1202026-01-052ben@simplified.orgBen402026-01-093cy@simplified.orgCy02026-02-144dee@simplified.orgDee3002026-03-025eli@simplified.orgEli402026-03-206fay@simplified.orgFay752026-04-11ada@simplified.org14022026-03-023

Databases · Lesson 3.2

Tables

Where a row meets a column

Simplified
0:00 / 1:37

Simplified's users table holds a row for each learner, and every row has an email, a name and XP.

So how does every learner's row end up with the same kinds of facts?

Well, think back to when you signed up for Simplified.

The sign-up form had a box for your email, and a box for your name.

Every learner filled in those same two boxes, with their own answers.

So users keeps each box's answers in one strip, running down every row.

Like the phone numbers in your contacts table, each of those strips is a column.

A column is one fact that every row has, like email.

Sign upEmailNameusersemailnameada@simplified.orgAdaben@simplified.orgBency@simplified.orgCydee@simplified.orgDeeeli@simplified.orgElifay@simplified.orgFay

So which columns does users have?

Two come from the form: email and name.

Simplified adds an XP column itself, for the XP each learner earns.

And a column called created at holds when each learner signed up.

Then there's ID, a number no other learner has, like a contact's ID.

We'll see where each learner's id comes from in a later lesson.

usersidemailnamexpcreated_at1ada@simplified.orgAda1202026-01-052ben@simplified.orgBen402026-01-093cy@simplified.orgCy02026-02-144dee@simplified.orgDee3002026-03-025eli@simplified.orgEli402026-03-206fay@simplified.orgFay752026-04-11

So where exactly is Ada's email?

usersidemailnamexpcreated_at1ada@simplified.orgAda1202026-01-052ben@simplified.orgBen402026-01-093cy@simplified.orgCy02026-02-144dee@simplified.orgDee3002026-03-025eli@simplified.orgEli402026-03-206fay@simplified.orgFay752026-04-11ada@simplified.org14022026-03-023

Start at Ada's row, then go across to the email column.

Where they cross, one box holds ada@simplified.org.

That box is called a cell.

A cell is one row's value for one column.

Ben's XP is a cell too: Ben's row, the XP column, 40.

And Dee's sign-up date is where Dee's row meets created at: 2026-03-02.

So every row has the same columns, one for each kind of fact.

And each cell holds one value: one row's fact for one column.

Example: Where a row meets a column

Spotify might keep its accounts in a table with the columns id, email, name and country. Your row holds your email, your name and the country USA.

Where exactly is USA kept?

Explanation

First, USA is one of your facts, so it's in your row.

Then, it's your country, so it's in the country column.

Therefore, USA is in the cell where your row meets the country column.

Question 1

Say Todoist keeps its tasks in a table with 3 columns: title, due date and project. It holds 8 tasks, one row each.

How many cells does one task's row hold?

cells

Question 2

Instagram might keep its accounts in a table, one row for each account. Every account has a username, a name and a bio.

In that table, what is bio?

Question 3

Say YouTube keeps its videos in a table, one row for each video, with a views column for how many times each video was watched. One video's row holds 1,200 in the views column.

What is that 1,200?

Question 4

Duolingo's sign-up form asks for your age, your name and your email. Say Duolingo keeps its learners in a table, one row for each learner.

Where would every learner's age go?

Question 5

Simplified's users table has the columns id, email, name, xp and created_at, one row for each learner. One more learner signs up.

What changes in the table?

Question 6

Say Netflix keeps its profiles in a table with the columns name, language and avatar, one row for each profile. Your profile's language is Spanish.

Where exactly is Spanish kept?

Assistant

Highlight lesson text and click Ask AI, or type a question below.