Skip to content

Table Design Standard

Purpose

The Table Design Standard defines common rules for future PostgreSQL table specifications.

Table Types

Type Purpose
Source table Canonical operational facts owned by a Domain.
Workflow table Domain-owned lifecycle or process state.
Audit table Traceability records or audit references.
Outbox table Transactional event publication records.
Read model table Query projection, rebuildable where practical.
Configuration table Administration-owned operational configuration.

Required Design Considerations

Concern Requirement
Ownership Owning module and Domain are explicit.
Tenant context TenantId and OrganizationId included where applicable.
Identity Primary key and natural uniqueness rules are explicit.
Lifecycle Status, effective dates, archive, or soft delete behavior is defined where needed.
Audit Created/updated actor and timestamps are included for mutable records.
Optimistic locking Mutable source tables include a version strategy.
Classification Sensitive or restricted data is identified.
Retention Retention and deletion expectations are documented.

Rules

  • Tables must be designed around business concepts, not UI screens.
  • Tables must not expose source ownership to other modules through direct access.
  • Nullable columns require business reason.
  • JSON columns require documented structure, validation, and ownership.
  • Soft delete must use explicit status or deletion columns and retention policy.
  • Timestamps should preserve timezone-safe instants.

Non-Goals

This document does not define final table names, SQL types, partitioning, storage parameters, or entity mappings.