Database architecture has no single, universally fixed set of layers; the layers you enumerate depend on whether you are describing a database engine's internal architecture, a multi-tier application that uses a database, or an organization's data architecture. The most common general-purpose breakdown separates the system into a client/presentation layer, an application or service layer, a query-processing layer, a storage engine layer, and a physical storage layer, with a separate discussion of the network and operational layers that support them. Explaining where each version of the list comes from is essential, because the "layers" in a DBMS internals diagram, the "tiers" in a three-tier application description, and the "layers" in an enterprise data architecture are not the same objects.
Why the answer is architecture-dependent
The phrase "database architecture layers" is ambiguous in a way that matters. Three related but distinct uses dominate:
DBMS internal architecture. This describes the components inside a database management system—how a SQL statement travels from a parser to an execution engine and ultimately to disk or memory. Application architecture. This describes how a database is reached in a software system, usually as a tier in a client/server or multi-tier deployment. Data architecture. This describes how data is organized, governed, and distributed across an organization—operational databases, warehouses, lakes, and the metadata and access layers around them.
A list of layers from one of these will not match the others. A "storage layer" in DBMS internals is not the same as a "storage tier" in a cloud data platform. Before answering "which layers are there," it helps to say which sense you mean. Below, the DBMS-internal sense is treated as the primary answer because it is the most concrete and the most commonly meant in programming and database-engine contexts, with the other two senses explained so the distinction is usable.
The core database engine layers
A conventional relational database engine is typically drawn with these layers, from the outside in.
Client / interface layer
This is the boundary where clients submit requests. It includes the wire protocol (for example, the PostgreSQL frontend/backend protocol, MySQL's client/server protocol, or JDBC/ODBC driver communication), connection handling, authentication, and session management. In embedded databases such as SQLite, this layer collapses into a library-call interface rather than a network protocol. The important point is that this layer is about how requests arrive and who is allowed to send them; it is not where query logic lives.
Query-processing layer
This layer turns a statement into a plan and runs it. It is often subdivided:
Parser and rewrite: converts SQL text into a parse tree, checks syntax, and applies rule-based rewrites (for example, view expansion or simple predicate simplification). Analyzer / binder: resolves names, checks types, and consults catalog metadata to confirm that tables and columns exist and that operations are type-valid. Planner / optimizer: produces logical and physical plans. The optimizer considers alternative access paths, join orders, and join algorithms and estimates their cost using statistics. This is the layer most associated with performance differences between database systems. Executor: runs the chosen plan, often as an iterator or pipeline of operators (scan, filter, join, aggregate, sort), pulling or pushing tuples between operators.
Some systems add a catalog and metadata manager alongside rather than inside this layer, but it is always involved: the analyzer and optimizer cannot work without schema, type, and statistics metadata.
Transaction and concurrency layer
Not always drawn as a distinct band, but functionally present in any system offering transactions: this layer implements atomicity, isolation, and durability guarantees through mechanisms such as write-ahead logging, lock managers, multiversion concurrency control (MVCC) snapshot management, and commit/rollback protocols. In many diagrams it is folded into the execution or storage layer; in others—especially in systems that support multiple storage engines—it sits above the storage engine and is shared. MySQL's architecture is a well-known example: the server layer above the pluggable storage engines handles parsing, optimization, and much of the transaction and locking machinery, while engines such as InnoDB or MyISAM provide their own storage behavior and, in InnoDB's case, its own transaction and MVCC implementation. That split is a concrete illustration that "the transaction layer" is not positioned identically in every DBMS.
Storage engine layer
The storage engine is the component that actually reads and writes data structures on persistent (or in-memory) media. It owns page layout, buffer-pool management, index structures (B-tree, hash, LSM-tree), free-space management, and often compression and encryption at rest. In systems with pluggable engines, this is an explicit interface: the upper layers call a storage-engine API. In others, it is monolithic. The storage engine is where the physical/logical distinction becomes vivid: a B-tree index is a logical access path that the optimizer chooses, but its page format and split behavior are storage-engine internals.
Physical storage layer
Beneath the storage engine sit the operating system, file system, and hardware—data files, log files, and the block device or cloud object store they live on. Some diagrams treat this as part of the storage engine layer; others separate it because the database's durability and I/O characteristics depend on the underlying medium. A cloud-native database may replace local files with a distributed storage service, in which case "physical storage" spans both the database's own file abstractions and the remote storage system.
A compact comparison of the three senses
| Sense | Typical layers | What the layers describe |
|---|---|---|
| DBMS internals | Client/interface → query processing (parse, analyze, plan, execute) → transaction/concurrency → storage engine → physical storage | Components inside the database server |
| Application tiers | Presentation/client → application/server → database server (and sometimes a separate data-access layer) | How an application reaches and uses a database |
| Data architecture | Sources/operational systems → integration/ingestion → storage (warehouse, lake, operational stores) → semantic/access → consumption/BI and governance/metadata across all | How data is organized and governed across systems |
The table is a genuine comparison, not a claim that these are interchangeable. A "data-access layer" in application architecture—often a repository or ORM abstraction—is a software design pattern, not a DBMS component. Confusing it with the DBMS's query-processing layer is a common source of muddled explanations.
How a query passes through the engine layers
Concretely, consider SELECT name FROM customers WHERE id = 42; against a relational database:
1: The client layer accepts the connection and the statement. 2: The parser builds a parse tree; the analyzer confirms customers.name and customers.id exist and that id is comparable to 42. 3: The optimizer decides between a sequential scan and, say, a primary-key index lookup, using statistics about table size and index selectivity. 4: The executor runs the chosen plan; with an index lookup it asks the storage engine to fetch the relevant page or key. 5: The storage engine reads from its buffer pool or issues I/O to the physical storage; the transaction layer ensures the read sees a consistent snapshot and that any concurrent writes are handled per the isolation level. 6: The result travels back through the executor and client layer.
Each arrow crosses a layer boundary, and each boundary is a place where a different kind of concern is handled: protocol, semantics, cost, execution, durability/consistency, and I/O. That separation of concerns is the real reason the layered description is useful—not the exact number of boxes.
Ambiguities and where the list stops applying
Several caveats prevent the layered list from becoming a false universal rule.
Not every DBMS has a distinct optimizer layer. A key-value store or a simple embedded engine may go almost directly from request to storage. The absence of a planner is a design choice, not an incomplete implementation of "the" architecture. "Layer" versus "tier." Use "layer" for logical separation of concerns inside a system and "tier" for physical deployment separation (client tier, application tier, database tier). A three-tier web application has tiers; a DBMS has layers. Mixing the terms produces diagrams that imply a network boundary where there is only a code boundary. Cloud and distributed systems rearrange the picture. In a distributed SQL database, the query layer may be a separate coordinator service, the storage layer may be a replicated consensus-backed service, and the transaction layer may span nodes. The same functional layers exist, but their physical placement changes, and new concerns (replication, consensus, sharding/routing) appear that a single-node diagram omits. NewSQL, LSM-based, and columnar systems still fit the functional layering, but the storage engine's internal structures (log-structured merge trees, columnar compression) differ enough that a diagram built around B-tree pages will mislead. The data-architecture sense stops applying to engine internals entirely. A warehouse's "semantic layer" is a modeling and access abstraction for consumers; it has no counterpart inside a storage engine.
Related terms and how they are used
Logical vs. physical layers: "logical" refers to schemas, tables, and views as users understand them; "physical" refers to pages, files, and indexes. The storage engine is where the mapping between them is enforced. Data-access layer / DAL: in application code, the module that encapsulates database calls. It is an application-architecture layer, not a DBMS layer. Persistence layer: often used loosely for the storage engine plus physical storage, or for the ORM/repository code that talks to the database, depending on the author. The term is genuinely ambiguous and should be defined when used. Semantic layer / metrics layer: in analytics, the governed definitions of metrics and dimensions exposed to BI tools. It is a data-architecture layer, not a database-engine layer.
Putting the answer together
If the question is about the internal architecture of a database engine, the layers are: client/interface; query processing (parsing, analysis, planning/optimization, execution); transaction and concurrency control; storage engine; and physical storage, with catalog/metadata management woven through the query layer. If the question is about how an application uses a database, the relevant layers are the presentation/client tier, the application/service tier (which may include a data-access layer), and the database server tier. If the question is about organizational data architecture, the layers are sources, ingestion/integration, storage, semantic/access, and consumption, with governance and metadata spanning them.
The honest answer to "which database architecture layers are there" is therefore: it depends on which architecture you mean, and the DBMS-internal list is the most precise and most commonly intended. Stating that distinction early avoids the most common confusion—treating a software design pattern (the data-access layer) as if it were an engine component, or treating a deployment tier as a logical layer.