Database Engineering with PostgreSQL#

Learn relational databases and SQL with PostgreSQL: installation, roles, querying, filtering, ER diagrams and joins, with hands-on tasks on the DVD Rental sample database.

How each session works#

  1. The big idea: the topic in plain words, with an everyday example.

  2. A picture: a diagram of the idea.

  3. Real queries: every SQL statement was run on PostgreSQL 17 and the output you see is what it printed.

  4. Common mistakes: what trips beginners up.

  5. Hands-on exercises: try first, then open the solution (each was run too).

  6. Practice: a quiz for the session.

Tip

All sessions use one small movie database. Create it once with code/00-setup.sql (psql -d course -f 00-setup.sql), then follow along in psql. Install PostgreSQL first from the Installing PostgreSQL page below if you have not yet.