Databases — Study Guide
Start here. This page is the map of the module: what each lesson covers, how to work through it, and what to install before the first session.
Module Map
| # | Lesson | Slides | Reading | Practice |
|---|---|---|---|---|
| 01 | Relational Modelling | deck | note | lab 01 |
| 02 | Querying | — | note | — |
How to Study This Module
- Before the session, skim the note's objectives and summary: ten minutes.
- In the session, follow the slides and answer every check question before the reveal.
- After it, read the note in full and do each Try it before opening its answer.
- Do the lab, then the note's knowledge check. A question you miss names the section to reread.
The examples build one domain, so a lesson you skip leaves a gap in the next one.
Environment Setup
| Component | Version | Check it works |
|---|---|---|
| PostgreSQL | 16 (14 or later behaves the same here) | psql --version |
| A SQL client | any | connects and runs SELECT 1; |
Create a scratch database you can drop and recreate freely:
createdb library_scratch
The Running Example
A small library catalogue: authors write books, a book can have several authors, and books are lent to members. Every example and lab in the module uses it.
Glossary
- Normalization
- Organising columns so each fact is stored once.
- Surrogate key
- A key with no meaning outside the database.