Databases

Soft Deletes: The Tombstone Tracking Pattern

ER Diagrams · made in Skemio

ER diagram showing accounts, projects, project tombstones, and audit logs illustrating the tombstone soft delete pattern.
ER diagram showing accounts, projects, project tombstones, and audit logs illustrating the tombstone soft delete pattern.

What it shows

  • Nullable deleted_at columns break unique constraints and index sizes.
  • Tombstone tables keep primary OLTP tables small, indexed, and fast.
  • Archive snapshots into JSONB payloads to preserve historical audit data.

The takeaway

Replace messy soft delete flags with tombstone tables to preserve index speed and FK integrity.

More er diagrams