Postgres: Best design pattern for “Exclusive Arc” (Polymorphic) relationships? (Nullable FKs vs. alternatives)
Summary This postmortem examines a common relational‑design failure: implementing Exclusive Arc (a.k.a. Polymorphic) relationships in PostgreSQL using multiple nullable foreign keys. The pattern works at first, but it becomes brittle, hard to extend, and difficult to enforce correctly. Senior engineers eventually replace it with cleaner, constraint‑friendly designs. Root Cause The root cause is the assumption … Read more