Phase 0 of 8 · 4 lessons
Start here: databases, tables and SQL
Know what a database is, what a table, a row and a key are, and the six practice tables you will use in every lesson.
Almost every app keeps its data in a relational database, and SQL is how you ask it questions. Learn the shape of the data first — tables, rows, keys — and every later topic is just a new way of asking.
Lessons, in order
-
0.1
What a database, a table and SQL are
A relational database stores data in tables of rows and columns, and SQL (Structured Query Language) is the language you use to ask it questions and to change what it holds.
-
0.2
Meet the practice database
Six small tables — departments, employees, customers, orders, products and order_items — that every example and exercise in this course uses.
-
0.3
Keys and relationships: primary keys, foreign keys, one-to-many, many-to-many
A primary key is a column whose value identifies exactly one row; a foreign key is a column that holds another table's primary key, and those links are how tables relate: one-to-many, many-to-many or one-to-one.
-
0.4
Data types: numbers, text, dates and true/false
Every column has a data type — such as INTEGER, a decimal number, TEXT, a date or a boolean — which decides what values it can hold and how they compare, sort and calculate.