SQL and databases

Stage 1 · Lesson 1 of 8

Tables, rows and columns

Relational thinking and your setup

A keeps data in tables. Each table holds one kind of thing, such as customers or orders. Each row is one of those things, like one customer.

Each column is one detail about it, like a name or a date, and every value in a column has the same type. Tables do not copy each other's data. Instead they point at each other with key values: an order stores customer_id 42, not the customer's name.

Because each fact is stored only once, can combine tables to answer questions nobody planned for when the database was built. Everything later in this roadmap, from joins to normalisation, builds on this picture.

Common traptreating a table like a spreadsheet tab and packing several facts into one cell, such as a comma-separated list of product names, which makes every later query harder.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

Keep handy

  • The installation chapter for your platform and the mysql client page

  • A one-page map of SQL topics: use it to see where each stage of this roadmap fits

Mark this stage as not done?