Project tracker
PostgreSQL schema · 4 tables · 4 declared foreign keys. Endpoint labels show how many records may relate to one record at the opposite end.
Relationships
-
project_members.user_id → users.id
Each membership references exactly 1 user; each user has 0..* memberships. -
project_members.project_id → projects.id
Each membership references exactly 1 project; each project has 0..* memberships. -
tasks.project_id → projects.id
Each task references exactly 1 project; each project has 0..* tasks. -
tasks.assignee_id → users.id
Each task references 0..1 user; each user may be assigned 0..* tasks.
Legend & constraints
PK primary key · FK foreign key · UQ unique · NN not null · NULL nullable. Primary keys imply uniqueness and not-null constraints.
1 exactly one · 0..1 zero or one · 0..* zero or many. Counts beside a table describe participation at that end.
PK¹ marks parts of a single composite key. None of the foreign-key columns is individually unique, so multiple child rows may reference the same parent. No constraint requires a parent to have any child rows.
Only declared foreign keys are connected. The schema does not require a task’s assignee to be a member of its project.