Skip to content
Home » Architecture of a DBMS

Architecture of a DBMS

Below is a clear, complete, exam-oriented and advanced-level explanation of the Architecture of a Database Management System (DBMS).
This covers all layers: External, Conceptual, Internal (3-Level Architecture) + DBMS Functional Components + Query Processing & Storage Engine Architecture — the way universities ask.


ARCHITECTURE OF A DBMS (Advanced Explanation)

A DBMS Architecture describes how data is stored, accessed, processed, and managed inside the system.
It is divided into two major perspectives:

  1. ANSI–SPARC 3-Level Architecture (Logical View)
  2. DBMS Functional Architecture (Internal Components)

Let’s discuss both.


1) ANSI–SPARC 3-LEVEL DBMS ARCHITECTURE

This model separates user views from the physical storage.
It provides data independence.

(A) External Level (View Level)

  • The highest level, closest to end users and applications.
  • Each user sees only the relevant portion of the database.
  • A database may have multiple external views (e.g., student view, admin view).
  • Views are implemented using SQL Views, stored procedures, application APIs, etc.

Purpose:
✔ Security (users cannot see hidden data)
✔ Customization (different users see different formats)


(B) Conceptual Level (Logical Level)

  • The entire logical structure of the database.
  • Contains entities, attributes, relationships, constraints, and high-level schema.
  • Independent of physical storage.

Includes:

  • Tables
  • Views
  • Constraints (PRIMARY KEY, FOREIGN KEY, CHECK)
  • Logical relationships
  • Logical data model (ER → relational schema)

Purpose:
✔ Logical Data Independence
✔ Single global view of the data


(C) Internal Level (Physical Level)

  • The lowest level, closest to the storage.
  • Describes how data is actually stored.

Includes:

  • Physical files
  • Pages, extents, blocks
  • Indexes (B-Tree, Hash, GIN, Clustered index)
  • Record formats
  • Storage paths
  • Compression methods
  • Buffer organization & caching
  • Access methods (sequential, indexed, hashing)

Purpose:
✔ Physical Data Independence
✔ Efficient storage & retrieval


Data Independence

A key achievement of 3-level architecture:

1) Logical Data Independence

Changes at conceptual level do not affect external schemas.
Example: Adding a new column does not break user applications.

2) Physical Data Independence

Changes in storage techniques do not affect conceptual schema.
Example: Changing B-Tree index to Hash index doesn’t affect the logical schema.


2) FUNCTIONAL ARCHITECTURE OF A DBMS (Internal Components)

Modern DBMS architecture contains multiple subsystems:


A) Query Processor (Front End)

Interprets and executes user queries.

Components of Query Processor

1. DDL Compiler

Processes CREATE, ALTER, DROP commands → updates metadata.

2. DML Compiler

Converts SQL queries into low-level machine instructions.

3. Query Parser

  • Checks SQL syntax
  • Verifies table/column names
  • Creates parse tree

4. Query Optimizer (Most Important Component)

  • Generates the most efficient execution plan
  • Uses:
    • Cost-based optimization
    • Statistics
    • Index choices
    • Join strategies (nested loop, merge join, hash join)

5. Query Executor

Runs the optimized plan using:

  • Access methods
  • Buffer manager
  • Indexes
  • Storage engine

B) Storage Manager (Back End)

Controls how data is stored, retrieved, and updated on disk.

Components

1. File Manager

Manages physical files on secondary storage.

2. Buffer Manager

  • Manages main memory buffers
  • Caches frequently accessed pages
  • Minimizes disk I/O
  • Uses replacement policies: LRU, MRU, CLOCK

3. Index Manager

Maintains and updates index structures.

4. Transaction Manager

Ensures ACID properties.

5. Lock Manager

Provides concurrency control using:

  • Shared/Exclusive locks
  • Deadlock detection
  • Timestamp ordering
  • Multiversion concurrency control (MVCC)

6. Recovery Manager

Executes backup & recovery using:

  • Write-Ahead Logging (WAL)
  • Checkpoints
  • Rollback & Rollforward
  • Crash recovery algorithms (ARIES)

C) Metadata / Catalog Manager

Stores the schema definitions in a system catalog (data dictionary).

Contains:

  • Table definitions
  • Data types
  • Index details
  • Views
  • Users & privileges
  • Constraints
  • Statistics for query optimization

Modern DBMS catalogs are themselves stored as tables.


D) Communication Manager

Interfaces with clients using:

  • JDBC
  • ODBC
  • Web APIs
  • Network protocols
  • Client/server architecture

3. DBMS ARCHITECTURAL MODELS

Different architectures depending on deployment:

(A) Centralized Architecture

  • All data stored in one central server
  • Clients act as terminals
  • Example: small organization DBMS setups

(B) Client–Server Architecture

  • DBMS server + multiple clients
  • Clients send queries → server processes
  • Examples: MySQL, PostgreSQL, SQL Server

(C) Distributed Architecture

  • Data is distributed across multiple nodes
  • Horizontal/vertical fragmentation
  • Replication + consistency models

(D) Parallel / Cluster Architecture

  • Multiple processors executing DBMS operations
  • Shared-nothing, shared-disk systems
  • Used in Big Data (Spark SQL, Cassandra)

FULL SUMMARY (Perfect for Exams)

A DBMS consists of:

1. Three Levels

  • External/View Level
  • Conceptual/Logical Level
  • Internal/Physical Level

2. Key Components

  • Query Processor
  • Storage Manager
  • Transaction & Lock Manager
  • Recovery Manager
  • Metadata Manager
  • Buffer & File Manager
  • Clients / Communication manager

3. Purpose of DBMS Architecture

✔ Data Independence
✔ Security
✔ Efficient Query Processing
✔ Concurrency Control
✔ Reliability & Recovery
✔ Multi-user performance