1. International Islamic University H-10, Islamabad, Pakistan
Database Managements Systems
Week 02
Database System
Architecture
Engr. Rashid Farid Chishti
http://youtube.com/rfchishti
http://sites.google.com/site/chisht
i
2. Identify the components of DBMS architecture
Understand the architectural design of DBMS
Learn the three-tier architecture model
Explore the interactions between users and databases.
Understand different types DBMS based on application needs.
Course Objectives
3. 1. Software: DBMS software (e.g., Oracle, PostgreSQL, MySQL)
2. Procedures: Rules and guidelines for database operations
3. Database Access Language: SQL for querying and managing data
4. Hardware: Physical servers, storage devices
5. Data: Actual data stored in tables
6. Users:
Database Administrators (DBA)
Developers
End Users
Components of DBMS
Hard
ware
Soft
ware
Data
Proce
dures
Users
SQL
Compon
ents of
DBMS
4. 1. Hardware: Set of physical electronics devices such as computers, I/O devices,
storage devices.
Examples: When we run oracle or MySQL on our personal computer, then our computers
hard disk, our keyboard using which we type in all the commands.
2. Software: This is the set of programs used to control and manage the overall
database.
Example: The software in DBMS environment includes operating system, database
management system, application programs, support utility programs.
3. Data: The main task of DBMS is to process the data.
Database are defined, constructed, and then data is stored, retrieved and updated to and
form the database.
Example: Name (Size, Characters, Unique, Length)
Components of DBMS
5. 4. Procedures: These are the instructions and rules that assist on how to use
the DBMS, and in designing and running the database, using documented
procedures, to guide the users that operate and manage it.
Examples: Procedures are used to setup and install a new DBMS to login and logout of
DBMS software, to manage DBMS or application programs, to take backup of the
database, and to change the structure of the database, etc.
5. People: The people are who control and manage the databases and perform
different types of operations on the database in the DBMS.
Database Administrator: Managing the license keys, user accounts and access etc.
Software Developer: This user group is involved in developing and designing the parts of
DBMs.
End Users: Web or Mobile, store user data.
Components of DBMS
6. 6. Database Access Language
SQL (Structured Query Language):
Standard language for database management.
Used for querying, updating, and managing data.
Example Commands:
SELECT: Retrieve data.
INSERT: Add new records.
UPDATE: Modify records.
DELETE: Remove records.
Components of DBMS
7. Definition: Database architecture is the design and structure that defines how
a database is managed, organized, and interacts with users and applications.
Goal: To enable efficient data storage, retrieval, and management.
Types of Database Architectures:
One-Tier Architecture
The database and application reside on the same system. Example: Microsoft Access.
Two-Tier Architecture
Consists of a client and a server. Example: MySQL with a direct client connection.
Three-Tier Architecture
Includes a client (User interface (UI), application server (Business logic processing),
and database server (Storage and management.). Example: Web applications using
MySQL with PHP.
What is Database Architecture?
8. It is a software design pattern where all components of an application (user
interface, business logic, and data) reside in a single codebase or system.
Characteristics of One-Tier Architecture:
All-in-One Structure: The application’s interface, logic, and database are
combined in one layer.
Direct Access: The client directly interacts with the database or performs all
functions within the same environment.
Simpler Design: Easier to develop and deploy since everything is contained
in a single executable or environment.
Limitations:
Not scalable for large applications
One-Tier Architecture
9. Desktop Software (Microsoft Word, Excel, Notepad)
All functionalities (text processing, data management) operate within the same
application without relying on a separate server or database.
Small Databases (MS Access, SQLite)
The database and application logic are embedded within the same file or system.
Standalone Media Players (VLC, Windows Media Player)
The player interface, decoding logic, and file access are all managed by the application
itself.
Offline Games (Solitaire or Minesweeper)
The game runs entirely on the user's device. It includes the user interface, game logic,
and any local storage for saving progress or high scores. No network connection or
external server is required.
Examples of One-Tier Architecture
10. Two-Tier Architecture, also known as Client-Server Architecture, is a software architecture
where the application is divided into two main components client and server.
Client (Presentation Layer):
Responsible for the user interface (UI) and user interactions.
Sends requests to the server and displays the results to the user.
Examples: Web browsers, desktop applications, or mobile apps.
Server (Data Layer):
Manages data storage, processing, and business logic.
Receives requests from the client, processes them, and sends back the results.
Examples: Database servers (e.g., MySQL, Oracle) or application servers.
Communication:
The client and server communicate over a network using protocols like HTTP, TCP/IP, or
SQL.
Two-Tier Architecture
11. Web Applications (Early Days)
Client: Web browser (e.g., Chrome, Firefox).
Server: Web server and database server (e.g., Apache + MySQL).
Example: A simple website where the browser sends HTTP requests to the server, and
the server responds with HTML pages.
Desktop Database Applications
Client: Desktop application (e.g., a custom-built app using Java or .NET).
Server: Database server (e.g., Microsoft SQL Server, Oracle).
Example: A point-of-sale (POS) system where the desktop app interacts with a local or
remote database.
Email Clients
Client: Email application ( Microsoft Outlook). Server: Email server (Microsoft Exchange)
Example: An email client retrieves emails from a server and displays them to the user.
Examples of Two-Tier Architecture
12. Three-Tier Architecture divides an application into three logical and physical layers: the
presentation layer, the application layer (business logic), and the data layer.
Presentation Layer (Client Tier):
Responsible for the user interface (UI) and user interactions.
Displays data to the user and sends user inputs to the application layer.
Examples: Web browsers, mobile apps, or desktop applications.
Application Layer (Logic Tier):
Handles the business logic, processing, and application functionality.
Acts as an intermediary between the presentation layer and the data layer.
Examples: Web servers, application servers, or microservices.
Data Layer (Data Tier):
Manages data storage, retrieval, and persistence.
Stores and processes data requested by the application layer.
Examples: Databases (e.g., MySQL, PostgreSQL, MongoDB) or file systems.
Three-Tier Architecture
13. Web Applications
Presentation Layer: Web browser (e.g., Chrome, Firefox).
Application Layer: Web server and backend application (Node.js, Django, Spring Boot).
Data Layer: Database (e.g., MySQL, PostgreSQL).
Example: An e-commerce website where:
The browser displays the product catalog (presentation layer).
The backend processes user requests, such as adding items to a cart (application
layer).
The database stores product and order information (data layer).
Mobile Applications
Presentation Layer: Mobile app (e.g., iOS or Android app).
Application Layer: Backend API (e.g., RESTful API built with Flask or Express.js).
Data Layer: Cloud database (e.g., Firebase, AWS RDS).
Examples of Three-Tier Architecture
14. Example: A social media app where:
The mobile app displays posts and notifications (presentation layer).
The backend API handles user authentication and post creation (application layer).
The database stores user profiles and posts (data layer).
Gaming Applications
Presentation Layer: Game client (e.g., Unity or Unreal Engine).
Application Layer: Game server (e.g., custom backend or cloud-based service).
Data Layer: Database for storing player profiles and game data.
Example: A multiplayer online game where:
The game client renders the game world (presentation layer).
The game server manages player interactions and game logic (application layer).
The database stores player progress and achievements (data layer).
Examples of Three-Tier Architecture
15. 1. Internal Level (Physical View)
Describes how data is physically stored
Focuses on efficiency and performance
2. Conceptual Level (Logical View)
Defines what data is stored and the
relationships between data
Single view for the entire database
3. External Level (User View)
Defines how users interact with the database
Multiple views for different users
Levels of DBMS Architecture
External Level (User View)
Conceptual Level
(Logical View)
Internal Level
(Physical View)
17. Lowest level of Data Abstraction.
It defines how data is stored.
It tells the actual location of data that is being stored by the user.
The Database Administrator (DBA) decides that which data should be kept at
which particular disk drive, how the data has to be arranged, where it has to
be stored etc.
They decide if the data has be centralized or distributed.
It totally depends on the DBA, How he/she manages the database at the
physical level.
1. Internal Level (Physical View)
18. This level defines what data are stored in database & What relationship exists
among these data.
Logical levels decide structure of entire database.
DBA use the logical level for abstraction purpose.
Example:
Let us take an example where we use the relational model for storing the data.
We have to store the data of a student, the columns in the student table will be student
name, age, mail_id, roll_no etc.
Though the data is stored in the database but the structure of the tables like the student
table, teacher table, books table, etc are defined here in the conceptual level or logical
level.
Also, how the tables are related to each other are defined here.
2. Conceptual Level (Logical View)
19. This level tells the application about how the data should be shown to the
user.
Different views of same database can be created for user to interact with
database for user friendly approach.
Example:
If we have a login-id and password in a university system, then a student can view his
marks, attendance, etc. But the faculty of the university will have a different view.
Faculty will have options like salary, edit marks, enter attendance of the students, etc.
So, both the student and the faculty have a different view.
By doing so, the security of the system also increases.
In this example, the student can't edit his marks but the faculty who is authorized to edit
the marks can edit the student's marks.
3. External Level (User View)
20. External to Conceptual: Translates user queries to logical structures
Conceptual to Internal: Maps logical data to physical storage
Internal to Conceptual: Retrieves data from storage for logical representation
Interactions between Levels
21. 1. Relational DBMS (RDBMS): Data is stored in tables (rows and columns).
Relationships between tables are established using keys.
Examples: MySQL, PostgreSQL, Oracle, Microsoft SQL Server.
Use Case: Web applications, financial systems, banking systems.
2. NoSQL DBMS: Non-relational, flexible data storage, data is stored in formats
like documents, key-value pairs, graphs, or wide-columns.
Examples: MongoDB, DynamoDB, CouchDB, Cassandra, Redis.
Use Case: Big data applications, real-time analytics, social media platforms IoT.
3. Object-Oriented Databases: Data is stored in the form of objects, similar to
object-oriented programming languages.
Example: db4o, ObjectDB
Use Case: CAD/CAM systems, multimedia applications
Types of DBMS
22. 3. Hierarchical DBMS: Data is organized in a tree-like structure with parent-child
relationships.
Example: (IBM Information Management System (IMS))
Use Case: Legacy systems, File Systems, Directory Structure.
4. Network DBMS: Data is stored using a graph structure, allowing multiple
parent-child relationships (more flexible than hierarchical databases).
Example: Integrated Data Store (IDS)
Use Case: Complex data relationships, network and logistics.
6. Graph Databases: Data is represented as nodes (entities) and edges
(relationships).
Example: Neo4j, Amazon Neptune
Use Case: Social networks, recommendation engines, fraud detection
Types of DBMS (Cont.)
23. 7. Time-Series Databases: Optimized for storing and querying time-stamped
data.
Example: InfluxDB, TimescaleDB
Use Case: IoT, monitoring systems, financial data analysis
8. Key-Value Databases: Data is stored as key-value pairs.
Example: Redis, Riak
Use Case: Caching, session management, distributed systems
9. Columnar Databases: Data is stored by columns rather than rows, which
speeds up read operations for large datasets.
Example: Apache Cassandra, Google Bigtable
Use Case: Data warehousing, analytics
Types of DBMS (Cont.)
24. Database architecture provides the framework for efficient data management.
The three-tier model is widely used for its scalability and security.
Understanding DBMS components and architecture is essential for database
design and implementation.
Different DBMS types are used based on application needs, such as structured
vs. unstructured data, scalability, speed, and flexibility.
Understanding these DBMS types helps in choosing the right database for a
given use case.
Summary