DATABASE SYSTEMS
Module 1
Data Structures vs DBMS
Topics to be Covered
Need for database systems
Characteristics of Database Approach
Advantages of using DBMS approach
Actors on the Database Management Scene: Database
Administrator
Classification of database management systems
Data Models
Schemas and Instances
Three-Schema Architecture
The Database System Environment
Centralized and Client/Server Architectures for DBMSs
Overall Architecture of Database Management Systems
Introduction
Data
• Collection of raw facts that have implicit meaning.
Types of Data in DBMS:
• Numeric Data – Integer, Decimal (e.g., 101, 20.5)
• Text Data – Characters, Strings (e.g., "Anu", "CSE")
• Date/Time Data – (e.g., 2025-07-07, 10:30 AM)
• Boolean Data – True/False (e.g., isActive = true)
• Binary Data – Images, audio, video (e.g., stored in
BLOB(Binary Large Object) format)
Information
• In DBMS, information is processed, organized, and
meaningful data.
• Student Records
StudentID Name Marks
101 Anu 95
102 Ravi 72
103 Meena 88
Information:
• "Anu scored the highest mark."
• "The average marks of the class is 85."
• "Meena passed the exam with distinction.―
This is meaningful — derived from the raw data.
Derivation
Interpretation:
• Data is just presence/absence.
• Information is structured facts (like who was absent).
• Knowledge reveals patterns (frequent absentees).
• Experience comes from analyzing over time.
• Wisdom leads to actions (e.g., alerting mentors or
parents).
DATABASE
• Collection of related data
Types of Databases
Centralized Database
A Centralized Database is a single database stored and maintained at
one central location, such as a main server or data center, and all
users or client systems access it remotely through a network.
Feature Description
All data is stored in one central system (like
Single location
a big server)
Central authority controls who can
Controlled access
read/write data
Users connect to the database from
Remote access
different locations via the network
Easy to maintain, since there's only one copy
Data consistency
of data
Centralized control makes data backup and
Easier backup
security simpler
Centralized Database
• Advantages:
• Consistency – Same data for everyone
• Easier management – One place to
update/secure/backup
• Better control – Central team can monitor everything
• Disadvantages:
• ❌ Single point of failure – If the central server goes down,
everyone loses access
• ❌ Scalability issues – Can be hard to handle thousands of
requests from many users at once
Distributed Database
• A Distributed Database is a database where data is stored on
multiple computers (nodes/servers) located in different physical
locations, but all are connected by a network and appear as one
logical database to users.
Feature Description
Data is distributed Stored across multiple servers/locations
Logical integration Appears to users as a single database
Each site can operate independently to
Autonomy
some extent
If one node fails, others can continue
High availability
functioning
Users don’t need to know where data is
Location transparency
physically stored
Distributed Database
Aspect Centralized DB Distributed DB
Multiple servers at
Location One server/system
different locations
Only part of the system
Failure handling Entire system may fail
may fail
Faster due to local
Speed Depends on server load
access
Complex setup and
Complexity Simple
maintenance
Distributed Database
Distribution strategies:
• Replication (Same Data in Different Locations)
• Fragmentation (Different Data in Different Locations)
• Hybrid (Combination of Replication + Fragmentation)
Relational Database
• A Relational Database stores data in the form of
tables (also called relations), where each table is
made up of rows and columns.
• It follows the Relational Model proposed by E. F.
Codd in 1970.
Relational Database
Term Meaning
A collection of rows and
Table (Relation) columns (like an Excel
sheet)
One record (e.g., one
Row (Tuple)
student, one product)
One property/field (e.g.,
Column (Attribute)
Name, Age, Price)
A unique identifier for each
Primary Key
row (e.g., Student ID)
A field that connects one
Foreign Key
table to another table
Relational Database
StudentID Name Age DeptID
101 Anu 20 1
102 Ravi 21 2
DeptID DeptName
1 Computer Sci
2 Electronics
These two tables are related using DeptID .
Advantages
Advantage Description
Enforces rules like primary
Data integrity
keys & foreign keys
Easy to write queries using
Flexibility
SQL
Normalization Reduces data redundancy
Supports simultaneous
Multi-user access
access by many users
Disadvantages
Limitation Description
Can be slower with very
Performance
large, unstructured data
Harder to scale horizontally
Scalability
(compared to NoSQL)
Schema must be defined
Rigid structure
before inserting data
Popular Relational Databases
• MySQL (open source, widely used)
• PostgreSQL (advanced, open source)
• Oracle Database (enterprise-grade)
• Microsoft SQL Server
• SQLite (lightweight, embedded)
NoSQL Database
• A NoSQL database is a non-relational database that
does not use tables to store data.
• Instead, it uses more flexible formats like documents,
key-value pairs, graphs, or wide-column stores.
• Large volumes of unstructured or semi-structured data
• High scalability (especially for web, IoT, big data, real-
time apps)
Types of NoSQL Databases & Examples
Type Description Examples
MongoDB,
Stores data as
1. Document CouchDB,
JSON-like
Store Amazon
documents
DocumentDB
Redis,
2. Key-Value Simple key →
DynamoDB, Riak,
Store value pairs
Berkeley DB
Stores data in Apache
3. Column Store columns (good for Cassandra,
analytics) HBase, ScyllaDB
Stores data as
4. Graph Neo4j, ArangoDB,
nodes and edges
Database Amazon Neptune
(relationships)
Examples of NoSQL
Data Type Example
Email content, Word documents,
Text
Tweets
Media Photos, Audio files, Videos
Web content HTML pages, blog posts
When to Use NoSQL?
• Choose NoSQL when:
• You need high scalability
• Your data structure changes frequently
• You deal with massive volumes of data
• You don’t need complex joins or ACID
transactions
SQL vs NoSQL
Use Case Best Option Why?
Structured, relational
Student Database or
SQL data; strict rules
College ERP
needed
Products change
E-commerce Product shape (specs,
NoSQL
Catalog reviews); needs
flexible schema
Needs strong
Banking or Finance
SQL consistency,
App
transactions (ACID)
Chat App / Real-time Fast, scalable writes;
NoSQL
Data low-latency reads
NoSQL (Column Handles large-scale,
Big Data Analytics
Store) wide data efficiently
Complex relationships
Social Network NoSQL (Graph DB) between users, posts,
etc.
Cloud Database
• A type of database where data is stored in a virtual
environment and executes over the cloud computing
platform.
• It provides users with various cloud computing services
(SaaS, PaaS, IaaS, etc.) for accessing the database.
There are numerous cloud platforms, but the best
options are:
• Amazon Web Services(AWS)
• Microsoft Azure
• Google Cloud SQL, etc.
Object-oriented Database
• The type of database that uses the object-based data
model approach for storing data in the database system.
• The data is represented and stored as objects which are
similar to the objects used in the object-oriented
programming language.
Hierarchical Database
• It is the type of database that stores data in the form of
parent-children relationship nodes. Here, it organizes
data in a tree-like structure.
• Each parent can have multiple children
• But each child has only one parent
• One-to-many relationships
• Eg. Windows File System- Folders (parent) → Files
(child)
Hierarchical Database
Network Database
• A network database is a type of database model that
allows multiple relationships between data records using
a graph-like structure.
• A child can have multiple parents.
• Many-to-many relationships
• Suitable for scenarios where data is highly
interconnected.
Network Database
Other Databases
• Traditional Database (Text and numbers)
• Multimedia Database
• Geographical Information Systems(GIS)
Database
• Real time Database
• Data Warehouse
DBMS
• A Database Management System (DBMS) is software
that is used to create, store, manage, and retrieve
data from a database efficiently.
• It is the processes of defining, constructing,
manipulating, and sharing databases among various
users and applications
• It provides an interface between the user/application
and the data, while ensuring security, consistency, and
integrity.
Database Systems
• The database and DBMS software together a database system
Need for Database Systems
• A Database System is required to efficiently store, retrieve,
manage, and secure data — especially when working with
large volumes of structured information.
Before Databases: What was used?
• Data was stored in flat files (text files, spreadsheets, etc.)
• Issues with traditional file management system:
• Data redundancy
• Inconsistency
• Difficult to search and update
• No security
• No concurrency control
Need for Database Systems
Why Do We Need Database Systems?
• Reduce Data Redundancy
• Avoid storing the same data multiple times.
• Example: A student’s name doesn’t need to appear in every
table.
• Avoid Data Inconsistency
• Inconsistent data arises when the same data exists in
different places with different values.
• DBMS maintains a single source of truth.
Need for Database Systems
Why Do We Need Database Systems?
• Efficient Data Access
• Supports powerful query languages (like SQL) to
retrieve and manipulate data quickly.
• Data Integrity and Accuracy
• Enforces rules like primary key, foreign key,
constraints, etc.
• Ensures only valid and accurate data is stored.
• Data Security
• Allows different access levels for different users.
• Example: Admins can edit, while students can only view.
Need for Database Systems
Why Do We Need Database Systems?
• Concurrency Control
• Multiple users can access the database simultaneously
without conflicts.
• Example: Many students registering at once during course
enrollment.
• Backup and Recovery
• Automatic backup and restore features help protect data in
case of failures.
• Data Independence
• You can change the structure of the database without
affecting the applications that use it.
Characteristics of DBMS
• Real World Entity: One of the most important and
easy-to-understand characteristics of DBMS is that it
is realistic.
• For example, we can have a Database Management
System for a School or a big MNC, and the data is
stored in the form of real-world entities.
• Any student that is stored in a Student database is
like a real-world student (object/entity) and has
properties (commonly known as attributes in DBMS
terms) like his/her name, gender, age, roll number,
etc.
Characteristics of DBMS
• Self Explaining Nature: A DBMS contains one
database and along with that it also contains metadata
about that one database.
• Metadata is the data about data. For example: In a
DBMS for a particular School, the total Number of rows
in the database and what is the name of each column of
the database table, and all such information about the
data is metadata
Characteristics of DBMS
• Atomicity of Operations (Transactions): Atomicity
means that either the operation should not be performed
or it should be performed in its entirety
• i.e. it must be either 0% or 100% completed. DBMS
provides us with atomic operations (i.e. any operation
which is either complete 100% or not complete at all).
This is very useful and important.
BEGIN;
UPDATE Account SET balance = balance - 1000 WHERE account_id = 'A';
UPDATE Account SET balance = balance + 1000 WHERE account_id = 'B';
COMMIT;
Characteristics of DBMS
• Concurrent Access without Anomalies: Multiple users can
access the database at the same time without any anomalies
Scenario:
• Two people (A and B) try to withdraw money from the same bank
account (balance: ₹1000) at the same time.
• Without DBMS Concurrency Control:
• A reads balance: ₹1000
• B reads balance: ₹1000
• A withdraws ₹500 → writes balance ₹500
• B also withdraws ₹500 → writes balance ₹500
Final balance = ₹500 instead of ₹0 (Lost update anomaly)
Characteristics of DBMS
With DBMS Transaction & Lock:
• A begins transaction
• A reads balance ₹1000 and locks the account
• B tries to read but waits (locked)
• A withdraws ₹500 → writes ₹500 → commits
• B now reads updated balance ₹500
• B withdraws ₹500 → writes ₹0 → commits
• Final balance = ₹0 (Correct result, no anomaly)
Characteristics of DBMS
• Integrity: Integrity means that the data which comes into
the Database should be correct as well as consistent
• Ease of Access (The DBMS Queries): Before DBMS,
the conventional file system (i.e. files and folders) was
used to store complex and large data. Searching for a
Name in thousands of Students was a very difficult task.
This is because manual searching is done in a
conventional file system for a particular data. However,
DBMS provides ease of access to the data inside the
database. We can run a search query to find any data
and the process is way faster than manual searching
and is more reliable.
Characteristics of DBMS
• SQL and No-SQL Databases: There are 2 types of
popular databases (not DBMS): SQL and No-SQL. The
SQL databases store the data in the form of Tables i.e.
rows and columns. The No-SQL databases can store
data in any other form than a table.
• For instance: the very popular MongoDB stores the data
in the form of JSON (JavaScript Object Notation). The
availability of SQL and No-SQL databases provides us
with the flexibility of choosing the method of storing the
data as well. This is a characteristic of DBMS because
DBMS allows us to perform operations on both kinds of
databases. So, we can run queries and operations on
SQL as well as No-SQL databases.
Characteristics of DBMS
• ACID Properties: The DBMS follows certain properties to
maintain consistency in the database.
• ACID stands for Atomicity, Consistency, Isolation, and
Durability.
• Atomicity means the transaction should either be 0% or 100%
completed and consistency means that the change in data
should be reflected everywhere in a database.
• Isolation means that multiple transactions can occur
independently without the interference of some other
transactions.
• Durability means that the changes of a successful atomic
transaction i.e. a transaction that has been 100% completed
should reflect in the database.
Characteristics of DBMS
Consistency
• Ensures rules, constraints, and relationships
are always satisfied.
• If a student’s age must be ≥ 18, any transaction
trying to insert age = 10 will be rejected.
Characteristics of DBMS
Isolation
• Multiple transactions can occur at the same time, but
they don’t interfere.
• The result is the same as if the transactions ran one
after the other.
• Two users booking the last seat on a flight — isolation
ensures only one will succeed, avoiding double
booking.
Characteristics of DBMS
Durability
• Once a transaction is committed, the changes are
permanent, even if a system crash occurs.
• If money was transferred and the bank server
crashes just after, the transaction still reflects when
the system comes back.
Why ACID is Important?
• Guarantees data correctness, even with:
• Crashes
• Errors
• Multiple users
Characteristics of DBMS
Security: The database should be accessible to the users
in a limited way. The access to make changes to a
database by the user should be limited and the users must
not be given complete access to the entire database.
Unauthorized users should not be allowed to access the
database.
Advantages of using DBMS approach
Data Redundancy is Minimized
• In file systems, the same data might be stored in multiple
files (duplication).
• DBMS reduce repetition.
• Example: Student details need not be stored separately
in attendance, marks, and library files.
Data Consistency is Improved
• Since redundancy is controlled, updates happen in one
place.
• All users see the same, up-to-date data.
Advantages of using DBMS approach
Better Data Sharing
• Multiple users and applications can access the same
database concurrently with controlled access.
• Example: A university admin and faculty can access the
same student database at the same time.
Improved Data Security
• DBMS allows access controls: only authorized users can
access or manipulate data.
• Example: A student can see their marks but not edit
them.
Advantages of using DBMS approach
.Data Integrity and Accuracy
• Constraints and rules can be enforced (e.g., no negative age,
valid department codes).
• Ensures high-quality, valid data.
Backup and Recovery
• Automatic backup and recovery features in modern DBMSs
protect data from failure or loss.
Concurrency Control
• DBMS handles simultaneous data access using
transaction management.
• Ensures ACID properties (Atomicity, Consistency,
Isolation, Durability).
Advantages of using DBMS approach
Data Independence
• You can modify the schema without changing the
application logic.
Efficient Query Processing
• Powerful query languages (e.g., SQL) help in quickly
retrieving and manipulating data.
Actors / Database users on the Database
Management Scene
• Actors refer to the different types of users or roles that
interact with the database.
• Database Administrator (DBA)
• Role: Oversees the overall management of the database
system.
• Responsibilities:
• Install and configure the DBMS
• Manage user access and security
• Backup and recovery
• Performance tuning
• Define storage structures
Actors on the Database Management
Scene
Performance tuning
• Optimization techniques used to make the database
system run faster and more efficiently
• Faster query execution, Better user experience, efficient
use of CPU, memory, and disk
• Scalability for large datasets and many users, reduced
system downtime
Actors on the Database Management
Scene
• Key Responsibilities of a DBA
Actors on the Database Management
Scene
• Database Designers
• Role: Design the structure of the database.
• Responsibilities:
• Define the database schema
• Design tables, relationships, and constraints
• Normalize data to remove redundancy
Actors on the Database Management
Scene
• End Users
• Role: Interact with the database to perform day-to-day
operations.
• Types of End Users:
• Naive Users: Use application interfaces (e.g., ATM users, e-
commerce customers)
• Sophisticated Users: Use query languages like SQL (e.g.,
data analysts)
• Sophisticated users are individuals who directly interact with
the database without using application programs. They
use database query languages like SQL to perform complex
tasks such as querying, analysing, and manipulating data.
Actors on the Database Management
Scene
• Application Programmers: Write programs to interact
with the database
• Application programmers are users who write
software applications that interact with a database
using SQL queries embedded within programming
languages (like Java, Python, C#, PHP, etc.).
• Role: Build software that interacts with the DBMS.
• Responsibilities:
• Write application code
• Connect front-end interfaces to the database
• Ensure proper data flow between UI and DB
Actors on the Database Management
Scene
• Casual Users: Occasionally use SQL to fetch data
• Example: A sales manager querying the database for
monthly sales reports.
• Standalone Users
• Individuals who use personal databases for private
work.
• Use simple DB software like MS Access, no network
involved.
• Example: A teacher managing student records on a
local PC.
Actors on the Database Management
Scene
Actors on the Database Management
Scene
System Analysts
• Role: Analyse business requirements and translate them into
technical database solutions.
• Responsibilities:
• Acts as a bridge between users (like business people or clients)
and the technical team (like developers and DB designers).
• Understands user requirements: What data is needed? How
should it flow?
• Translates business problems into system requirements.
• May be involved in conceptual design, like preparing initial ER
diagrams, but not always in detailed DB design.
Actors on the Database Management
Scene
Backup and Recovery Operators
• Role: Responsible for ensuring data safety through
backups and restoration processes.
• Responsibilities:
• Schedule and verify database backups
• Restore data during failure or corruption
Classification of Database
Management Systems (DBMS)
• Database Management Systems (DBMS) are classified based
on various criteria like data model, number of users,
architecture, and data distribution
• Based on Data Model
• Hierarchical DBMS
• Network DBMS
• Relational DBMS (RDBMS)
• Object-Oriented DBMS (OODBMS)
• NoSQL DBMS
– Document DBMS
– Key-Value DBMS
– Columnar DBMS
– Graph DBMS
Classification of Database
Management Systems (DBMS)
• Based on Number of Users
Classification of Database
Management Systems (DBMS)
• Based on Architecture
Classification of Database
Management Systems (DBMS)
Centralized vs Client-Server DBMS
Classification of Database
Management Systems (DBMS)
• Based on Data Distribution
DATA MODELS
A Data Model is a framework that defines:
• How data is structured,
• How data is stored,
• How data is related,
• And how data can be manipulated in a database.
• Types of Data Models:
• Hierarchical Data Model, Network Data Model,
Relational Data Model, Entity-Relationship (E-R) Model,
Object-Oriented Data Model, Document Data Model,
Key-Value Data Model, Graph Data Model,
Model==Database?
Model
• A blueprint or design that defines how data is organized, related,
and managed in a database system.
Database
• A collection of actual data, stored and managed using a DBMS
(Database Management System), based on a specific model.
SCHEMA
• A schema is the overall logical structure of the database
— like a blueprint.
• Defined once when the database is created.
• Rarely changes.
• Examples:
• Table definitions
• Data types
• Keys and constraints
INSTANCE
• A database instance is the actual data stored in the
database at a particular moment in time.
• Changes frequently as data is inserted, updated, or
deleted.
• Each time you query the DB, you're seeing a new
instance.
Schema vs. Instance
Three-Schema Architecture
• Provides a framework for database
abstraction and simplifies database design
Internal Schema (Physical Level)
Conceptual Schema (Logical Level)
External Schema (View Level)
Three-Schema Architecture
Three-Schema Architecture
Internal Schema (Physical Level)
• It describes how the data is stored in the physical
computer the database system.
• This schema defines the file structures, indexing
methods, and the actual storage mechanisms used by
the DBMS.
Three-Schema Architecture
Internal Schema (Physical Level)
• ·What it is:
The physical storage of data — how data is actually stored in
memory or on disk.
• Purpose:
Focuses on efficiency, storage structure, indexing, and access
paths.
• Efficiency
• The internal schema is designed to make data retrieval and
storage as fast and resource-efficient as possible.
• It considers:
– How quickly data can be read/written
– How much memory and disk space is used
– How to reduce CPU and I/O load
Three-Schema Architecture
• Internal Schema (Physical Level)
• Storage Structure
• This defines how tables, rows, and indexes are stored on disk.
• DBMS uses:
– Heap files: unordered data
– Sorted files: data arranged in sorted order
– Clustered storage: related data stored close together
• Also manages encryption, and caching, compression
Three-Schema Architecture
Internal Schema (Physical Level)
• Indexing
• Indexes are special structures that speed up searching.
• Types include:
– B-tree index (good for range queries)
– Hash index (good for exact matches)
– Composite index (on multiple columns)
• Indexing improves efficiency by allowing the DBMS to avoid
full table scans.
Three-Schema Architecture
Internal Schema (Physical Level)
• Access Paths
• Access path = the method DBMS uses to access data.
• Examples:
– Full table scan (slow)
– Index scan (fast)
– Index range scan (for BETWEEN, >, < queries)
– Index-only scan (no need to read full table)
• DBMS chooses the best access path based on
available indexes and query conditions.
Three-Schema Architecture
Internal Schema (Physical Level)
Full table scan
• A Full Table Scan means the database engine reads every row in
the table sequentially, from start to end, to find rows that satisfy a
query condition.
• There is no use of an index — the DBMS checks every row one by
one.
CREATE TABLE students (
roll_no INT,
name VARCHAR(50),
age INT,
grade CHAR(1)
);
Suppose this table has 10,000 rows, and no index is defined.
SELECT * FROM students where name=‘WRU’;
Three-Schema Architecture
Internal Schema (Physical Level)
Index scan
CREATE TABLE employees (
emp_id INT PRIMARY KEY,
emp_name VARCHAR(50),
salary INT
);
-- Index on salary
CREATE INDEX idx_salary ON employees(salary);
SELECT emp_name FROM employees WHERE salary = 50000;
• DBMS uses idx_salary to find row IDs with salary = 50000.
• Then goes to the table to get emp_name (not in index).
Three-Schema Architecture
Internal Schema (Physical Level)
Index range scan
CREATE TABLE employees (
emp_id INT PRIMARY KEY,
emp_name VARCHAR(50),
salary INT
);
--Create an Index
CREATE INDEX idx_salary ON employees(salary);
SELECT emp_name, salary FROM employees WHERE salary BETWEEN
50000 AND 75000;
• This triggers an Index Range Scan:
• The index idx_salary is used to start scanning from 50000
• It continues sequentially through the index until it reaches 75000
• Then goes to the table to get emp_name
Three-Schema Architecture
Internal Schema (Physical Level)
Index-only scan
CREATE TABLE employees (
emp_id INT PRIMARY KEY,
emp_name VARCHAR(50),
salary INT
);
-- Create a composite index
CREATE INDEX idx_salary_name ON employees(salary, emp_name);
SELECT salary, emp_name FROM employees WHERE salary > 50000;
If all needed columns (salary, emp_name) are in the index, DBMS can
use only the index.
Three-Schema Architecture
Internal Schema (Physical Level)
Three-Schema Architecture
Conceptual Schema (Logical Level)
• Conceptual View = ER Diagram + Logical Structure
• What it is:
The community view of the entire database — defines what data is
stored and relationships.
• Purpose:
Provides a unified logical structure, independent of physical details.
• Example:
Entities like Student, Course, Department, and their relationships.
• Key Point:
There is only one conceptual schema for a database.
Three-Schema Architecture
Conceptual Schema (Logical Level)
Three-Schema Architecture
External Schema (View Level)
What it is:
The user’s view of the database — each user/application may see a
different version.
Purpose:
Hides the complexity of the logical structure and shows only the
necessary data.
Example:
A student user sees only their own marks; an admin sees all student
data.
Key Point:
Multiple external schemas can exist for a single database.
Three-Schema Architecture
• Data Independence:
• Data Independence is the ability to change the database schema at
one level without affecting the schema at the next higher level.
• Logical Data Independence
Definition: The ability to change the conceptual schema (logical
structure) without affecting the external schema (user views).
• Example:
• Adding a new table or attribute
• Splitting a table into two related tables
• Why it's useful: You can modify the data model to meet new
requirements without needing to rewrite all the application programs
or user interfaces.
Three-Schema Architecture
• Data Independence:
• Physical Data Independence
Definition: The ability to change the internal schema (how data is
stored) without affecting the conceptual schema (logical structure).
• Example:
• Changing from a B-tree index to a hash index
• Moving data from HDD to SSD
• Changing file structure from heap file to sorted file
• Why it's useful: You can improve performance or storage strategy
without affecting how data is logically organized.
The Database System Environment
• Main Components of a Database Environment
• Database, DBMS, Database Users, Hardware, Software,
Applications/Interfaces
• Types of Users in the Environment
• End Users, Application Programmers, DBA (Database Administrator),
System Analysts
• Database System Architecture:
• Data: Organized using schemas (external, conceptual, internal)
• DBMS Engine: Handles parsing SQL, query optimization, transaction
control
• Query Processor: Interprets and executes user queries
• Storage Manager: Manages physical data storage, indexing, buffers
• Catalog/Metadata: Stores data about data (e.g., table definitions,
indexes)
Overall Architecture of
Database Management Systems
• A DBMS architecture defines how users interact with the database
to read, write, or update information.
• A well-designed architecture and schema (a blueprint detailing
tables, fields and relationships) ensure data consistency, improve
performance and keep data secure.
• Types of DBMS Architecture
• 1-Tier Architecture
• 2-Tier Architecture
• 3-Tier Architecture
Centralized and Client/Server Architectures
for DBMSs
Centralized DBMSs Architecture
• Centralized databases are the traditional database systems where
all database functionality, data, application program and user
interface processing are located on one machine.
• In the early systems, the mainframe computers provided all the
functionalities required by the users.
• The users interacted with the mainframe computers via dumb
terminals. All processing was performed on the mainframe
computer.
• The centralized database is easy to manage and administer.
• However, there are also some drawbacks to this type of architecture.
Higher data traffic
If there is a system failure users do not have access to the database
Client/Server Architectures for DBMSs
DBMS Client/Server Architecture
DBMS Client/Server Architectures
1-tier Architecture
DBMS Client/Server Architectures
1-tier Architecture
• In 1-Tier Architecture, everything runs on the same system.
• The client, server, and database are part of one application.
• The user interacts directly with the database using the application.
• No network or separate server is needed.
• Example: Microsoft Excel – data entry, logic, and storage all happen on
the same device.
• Simple to use and easy to set up.
• Best suited for personal or standalone applications.
• Ideal for small-scale or individual use cases.
DBMS Client/Server Architectures
Advantages of 1-Tier Architecture
• Simple Architecture: 1-Tier Architecture is the most simple architecture
to set up, as only a single machine is required to maintain it.
• Cost-Effective: No additional hardware is required for implementing 1-
Tier Architecture, which makes it cost-effective.
• Easy to Implement: 1-Tier Architecture can be easily deployed and
hence it is mostly used in small projects.
• Disadvantages of 1-Tier Architecture
• Limited to Single User: Only one person can use the application at a
time. It’s not designed for multiple users or teamwork.
• Poor Security: Since everything is on the same machine, if someone
gets access to the system, they can access both the data and the
application easily.
• No Centralized Control: Data is stored locally, so there's no central
database. This makes it hard to manage or back up data across multiple
devices.
• Hard to Share Data: Sharing data between users is difficult because
everything is stored on one computer.
DBMS Client/Server Architectures
2-Tier Architecture
DBMS Client/Server Architectures
2-Tier Architecture
• The 2-tier architecture is similar to a basic client-server model.
• The application at the client end directly communicates with the database
on the server side.
• APIs like ODBC and JDBC are used for this interaction.
• The server side is responsible for providing query processing and
transaction management functionalities.
DBMS Client/Server Architectures
Advantages of 2-Tier Architecture
• Easy to Access: 2-Tier Architecture makes easy access to the database,
which makes fast retrieval.
• Scalable: We can scale the database easily, by adding clients or
upgrading hardware.
• Low Cost: 2-Tier Architecture is cheaper than 3-Tier Architecture
• Easy Deployment: 2-Tier Architecture is easier to deploy than 3-Tier
Architecture.
DBMS Client/Server Architectures
Disadvantages of 2-Tier Architecture
• Limited Scalability: As the number of users increases, the system
performance can slow down because the server gets overloaded with too
many requests.
• Security Issues: Clients connect directly to the database, which can
make the system more vulnerable to attacks or data leaks.
• Tight Coupling: The client and the server are closely linked. If the
database changes, the client application often needs to be updated too.
Example: Any change in the database (like column name, table name, or
data type) means the client code must also be changed.
• Difficult Maintenance: Managing updates, fixing bugs, or adding
features becomes harder when the number of users or systems
increases.
DBMS Client/Server Architectures
3-Tier Architecture
DBMS Client/Server Architectures
3-Tier Architecture
• The 3-Tier architecture contains another layer between the client and
server. In this architecture, client can't directly communicate with the
server.
• The application on the client-end interacts with an application server
which further communicates with the database system.
• End user has no idea about the existence of the database beyond the
application server. The database also has no idea about any other user
beyond the application.
• The 3-Tier architecture is used in case of large web application.
DBMS Client/Server Architectures
Advantages of 3-Tier Architecture
Enhanced Scalability:
• Application servers are deployed separately.
• No need for direct connections between every client and the database.
• System can handle more users easily.
Data Integrity:
• A middle layer checks and manages data before it reaches the database.
• Helps avoid or correct data corruption.
Improved Security:
– Clients do not directly access the database.
– Reduces risk of unauthorized data access or hacking.
– Sensitive data is better protected through the middle (application)
layer.
DBMS Client/Server Architectures
Disadvantages of 3-Tier Architecture
• More Complex: 3-Tier Architecture is more complex in comparison to 2-
Tier Architecture.
• Difficult to Interact: It becomes difficult for this sort of interaction to take
place due to the presence of middle layers.
• Slower Response Time: Since the request passes through an extra
layer (application server), it may take more time to get a response
compared to 2-Tier systems.
• Higher Cost: Setting up and maintaining three separate layers (client,
server and database) requires more hardware, software and skilled
people. This makes it more expensive.
Overall Architecture of
Database Management Systems