DataWeb & Software

PostgreSQL roadmap

Learn the world's favourite open-source database: queries, design, speed, safety and running it in production.

  • About 3 to 4 months
  • 5 to 7 hours a week
  • 5 stages

Tick each stage as you finish it. Your progress stays on this device.

Start stage 1

Time needed

About 3 to 4 months

5 to 7 hours a week. Install PostgreSQL on your own computer, or use a free hosted instance, and practise on real data.

Before you start

  • You have used a spreadsheet or a simple database
  • You are comfortable with the command line
  • Programming is helpful but not required

Not covered here

Other database types such as document and graph databases.

  1. Stage 13 weeks

    SQL fundamentals

    Ask questions of data.

    Learn

    • Select, filter, sort and group
    • Joins between tables
    • Subqueries and common table expressions
    • Inserting, updating and deleting safely

    Tools

    • PostgreSQL
    • psql or a database client
    • A sample database

    Build

    • Twenty queries on a sample database, each explained in a comment
    • A cleaned export of one query to share

    CheckpointYou can write a query that joins three tables and explain every line.

  2. Stage 23 weeks

    Design good tables

    Store data so it stays correct.

    Learn

    • Tables, keys and relationships
    • Normalisation in plain words
    • Constraints and data types
    • Migrations and changing a design safely

    Tools

    • A diagram tool
    • A migration tool
    • psql

    Build

    • A database design for a small shop with a diagram and a migration script
    • Constraints that stop three kinds of bad data

    CheckpointThe database refuses bad data without help from the application.

  3. Stage 34 weeks

    Speed

    Find and fix slow queries.

    Learn

    • Indexes and when they help
    • Reading EXPLAIN plans
    • Statistics and vacuuming
    • Transactions, locks and isolation

    Tools

    • EXPLAIN ANALYZE
    • pg_stat_statements
    • A data generator

    Build

    • Take a slow query on a large table from seconds to milliseconds and document the steps
    • A note on one lock problem you caused and solved

    CheckpointYou can show with EXPLAIN why a query is fast or slow.

  4. Stage 43 weeks

    Advanced features

    Use what makes PostgreSQL special.

    Learn

    • JSON data
    • Full-text search
    • Window functions and views
    • Extensions such as pgvector

    Tools

    • JSONB
    • Full-text search
    • pgvector

    Build

    • A search feature using full-text search
    • A table that stores and searches embeddings with pgvector

    CheckpointYou can say when to use a JSON column and when a normal table is better.

  5. Stage 5Ongoing

    Run it safely

    Keep the data available and protected.

    Learn

    • Backups and restoring
    • Replication and failover at a high level
    • Roles, permissions and encryption
    • Monitoring and upgrades

    Tools

    • pg_dump and base backups
    • A replica setup
    • A monitoring tool

    Build

    • A backup and a tested restore on a different machine
    • A role set-up that gives each app only what it needs

    CheckpointYou have restored a backup and checked the data is complete.

Afterwards

Roles this prepares you for

All career paths

Tools and model names change quickly. Treat the names here as examples, and check each tool's own documentation for what is current.