SQL and databases

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 columns

Lessons· one lesson for each topic, in this order

  1. 1Tables, rows and columns
  2. 2Primary keys and foreign keys
  3. 3The families of SQL statements
  4. 4Installing SQL Server locally
  5. 5SSMS or VS Code as your GUI
  6. 6The command-line client
  7. 7Loading a sample database
  8. 8Your first tables by hand

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

Keep handy

  • Install guides for Windows, Linux and containers, plus the sqlcmd and SSMS quickstarts

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

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.

Tauseef's advice
Use the free Developer edition to learn and remember it is not licensed for production. On a Mac, run SQL Server in Docker and use VS Code with the MSSQL extension. Learn sqlcmd too, and keep every script you write in Git from day one.

Mark this stage as not done?