SQL and databases

Stage 1 · Lesson 7 of 8

Loading a sample database

Relational thinking and your setup

Practise on realistic data from day one by loading a well-known . Use pagila or dvdrental for , sakila or world for MySQL, and AdventureWorks or WideWorldImporters for . These have dozens of related tables and thousands of .

They also include NULLs (missing values) and awkward cases that tiny practice tables hide. Loading one teaches a real skill too: running a script and a data script, or restoring a backup file. Spend twenty minutes exploring before you write queries. List the tables, look at their columns, and sketch how the main tables relate.

Common trappractising only on five-row tables you typed yourself, where every query looks correct and nothing is slow.

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

Resources for this stage

Start with· follow one of these

  • CourseFree
    CS50'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

  • GuideFree
    PostgreSQL Tutorial

    PostgreSQL Global Development Group · Beginner

    The short official tutorial: Chapters 1 and 2 cover creating a database and your first tables

Keep handy

  • Read the installation and psql pages for your platform, and bookmark the SQL commands reference

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

Mark this stage as not done?