DDD Thinking vs. Relational Database Design: Same Name, Different Entity
Bounded Contexts vs. Monolithic Global Database Schemas
Analyzing the divergence between relational database normalization (single shared global tables) and Domain-Driven Design (context-specific models where the same noun represents different entities across Bounded Contexts).
- The Relational Database Normalization Trap: Traditional DB design tries to create a single canonical table for each entity (e.g., a massive User or Account table with dozens of nullable columns shared across the enterprise). This creates tight schema coupling and high regression risks during database migrations.
- DDD "Same Name, Different Entity" Principle: In DDD, a noun (like User, Account, or Product) has fundamentally different responsibilities across Bounded Contexts. In Identity, it’s credentials; in Billing, it’s invoices and payment methods; in Logistics, it’s delivery address and tracking slots.
- Modeling each bounded context with its own purpose-built model and isolated database schema prevents domain contamination and enables autonomous microservice evolution.
"Do not unify domain entities under a single canonical schema just because they share a name. The same real-world noun represents completely different models with distinct invariants across different Bounded Contexts."
— Domain-Driven Design Principles, Software Architecture: DDD
