Stage 1 of 9 · 8 lessons · ~2 weeks
Relational thinking and your setup
Learn what tables, keys and relationships are, install your database locally with a GUI and a command-line client, and load a realistic sample database to practise on.
Start: Tables, rows and columnsLessons· one lesson for each topic, in this order
Do this
- Install your database server locally, or in Docker, and note the version, port and admin user.
- Install a GUI client and connect to your server.
- Connect with the command-line client, list tables and run a script file.
- Load a sample database and list its main tables and how they relate.
- Write a script that creates two related tables with primary and foreign keys and inserts a few rows.
- Start a Git repository for every .sql file you write in this roadmap.
Start with· follow one of these
- CourseFreeCS50's Introduction to Databases with SQL
Harvard University · Beginner
Watch Lecture 0 (Querying) for the relational model; it uses SQLite, and the ideas carry straight across
- GuideFreePostgreSQL Tutorial
PostgreSQL Global Development Group · Beginner
The short official tutorial: Chapters 1 and 2 cover creating a database and your first tables
Keep handy
Before moving on: Your database running locally, a GUI and the command-line client both connected, a sample database loaded, and a saved script that creates two related tables with keys and a few rows.

PostgreSQL is a great first database because it follows the SQL standard closely and has excellent documentation. Learn psql properly: \d, \dt, \i and \timing will save you hours. Keep every statement you write in a .sql file in Git from day one.