Training path

PostgreSQL

The most popular open-source relational database: design tables, query them with SQL, and run your own PostgreSQL server.

Your lab machineLive

A PostgreSQL server of your own, with psql, next to every lesson.

learner@linux-server:~$ createdb shop

learner@linux-server:~$ psql -d shop -c "\dt"

learner@linux-server:~$ pg_dump shop > shop.sql

What you'll learn

Every lesson runs on a PostgreSQL server of your own, where you are a superuser. You build a small shop database step by step: tables and types, queries and aggregates, transactions, joins and views, indexes and query plans, then roles and backups, each checked on your server.

Core skills

  • ✓psql and its meta-commands
  • ✓Tables, data types and constraints
  • ✓SELECT, WHERE, ORDER BY and GROUP BY
  • ✓UPDATE, DELETE and transactions
  • ✓Foreign keys, JOINs and views

Advanced topics

  • ✓Indexes and EXPLAIN ANALYZE
  • ✓Roles, privileges and pg_hba.conf
  • ✓Backups with pg_dump and restoring them
  • ✓Generating test data with generate_series

Course modules

  1. 01

    Your PostgreSQL server

    Connect with psql, look around with meta-commands, and create your first database.

    30 min
  2. 02

    Tables and data types

    Design a table with the right types and constraints, and insert rows.

    45 min
  3. 03

    Querying data

    Filter, sort and limit with SELECT, and summarize with aggregates and GROUP BY.

    45 min
  4. 04

    Changing data safely

    UPDATE, DELETE and ALTER TABLE, and transactions that undo mistakes.

    45 min
  5. 05

    Relationships and joins

    Foreign keys between customers, orders and products; JOIN, LEFT JOIN and views.

    1 hour
  6. 06

    Indexes and EXPLAIN

    Read query plans and make a query on 200,000 rows fast with an index.

    45 min
  7. 07

    Users, permissions and backups

    A read-only role for an application, then pg_dump and a tested restore.

    45 min

Prerequisites

Linux command-line basics. No SQL experience needed.

What's included

  • •7 hands-on chapters
  • •A PostgreSQL server of your own for every lesson
  • •Tasks checked on your machine with "Check my work"
  • •Nothing to install: everything runs in your browser

Who it's for

  • •Developers who want solid SQL
  • •Anyone starting with relational databases
  • •DevOps and SREs who run PostgreSQL

By the end, you'll be able to

  • •Design tables with the right types and constraints
  • •Write queries with filters, joins and aggregates
  • •Change data safely with transactions
  • •Speed up queries with indexes
  • •Create users with the least privilege, and back up and restore a database

Course format

  • •Self-paced online learning
  • •Lifetime access to course materials
  • •Regular content updates
  • •Community forum access

Support

  • •Email support from instructors
  • •Q&A sessions (monthly)
  • •Peer community support
  • •Course completion certificate

Course investment

Contact for pricing

Flexible payment options available

Ready for PostgreSQL?

Open your own PostgreSQL server and write your first query in minutes.