The Database-Centric Layering Problem
What you'll learn: You'll understand how traditional layered architectures often end up revolving around the database, creating hidden dependencies and limiting flexibility.
The Problem Emerges
In classic three-tier layered architecture, we typically place the database at the bottom, with a data access layer above it, then business logic, and finally presentation. This seems logical—data flows down to storage and back up to users.
However, this arrangement creates a subtle but serious problem: the database becomes the architectural center of gravity. Every layer above it must know about the database schema. Business logic gets shaped by database tables rather than domain concepts. Your domain model becomes a thin wrapper around database rows.
Why This Happens
When layers depend downward toward the database, architectural decisions start from "What tables do we need?" instead of "What business problems are we solving?" The data access layer exposes database structures upward, and the business layer adopts those structures directly. Soon, changing the database requires rippling changes through every layer.
The Analogy
Think of a building designed entirely around its plumbing. Every room's layout, every wall's position determined by where the pipes go. That's database-centric architecture—the infrastructure dictates the design rather than serving it.
The Consequence
This creates tight coupling to your persistence mechanism. Want to swap databases? Painful. Want to introduce caching or change your data model? Everything breaks. Your architecture becomes inflexible precisely where you need flexibility most—in representing and evolving your business logic.
The database should be a detail, an implementation choice. But traditional layering makes it the foundation everything else depends on.
Key Takeaway: Traditional downward-dependent layering often makes the database the architectural center, causing business logic to be shaped by persistence concerns rather than domain needs—creating coupling and limiting flexibility.