← Track projects
Track project · 09

Design the TaskFlow PostgreSQL Schema

Build and query the relational model directly in PostgreSQL before introducing the ORM.

Definition of done

What you are building

Deliverables

Build plan

Work through it one observable step at a time

  1. 01

    Create tables with deliberate data types and primary keys.

  2. 02

    Add foreign keys plus NOT NULL, UNIQUE, and CHECK constraints where they express real invariants.

  3. 03

    Insert realistic sample rows.

  4. 04

    Write SELECT/WHERE/ORDER BY queries used by TaskFlow.

  5. 05

    Write a JOIN showing task owner or workspace information.

  6. 06

    Write an aggregate query for task counts by status.

  7. 07

    Wrap a multi-row business change in a transaction and test rollback.

  8. 08

    Create a candidate index for a real list query, then compare `EXPLAIN ANALYZE` before and after.

  9. 09

    Explain which rules belong in PostgreSQL versus application code.

Evidence

Do not rely on “it seems to work”

Evidence to collect

Project exit ticket

Close the project only when these are true

Completion