Week 02 - Database System Architecture
Week 02 - Database System Architecture
Week 02
Database System
Architecture
Engr. Rashid Farid Chishti
http://youtube.com/rfchishti
http://sites.google.com/site/chis
hti International Islamic University H-10, Islamabad, Pakistan
Course Objectives
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.
Components of DBMS
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
Hard
5. Data: Actual data stored in tables ware
6. Users: SQL Soft
Database Administrators (DBA) ware
Compon
Developers ents of
DBMS
End Users
rs
Use
Data
Proce
dures
Components of DBMS
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
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. Database Access Language
SQL (Structured Query Language):
Example Commands:
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.
One-Tier Architecture
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
Sends requests to the server and displays the results to the user.
Receives requests from the client, processes them, and sends back the results.
Communication:
The client and server communicate over a network using protocols like HTTP, TCP/IP, or
SQL.
Examples of Two-Tier Architecture
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.
Three-Tier Architecture
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.
Examples of Three-Tier Architecture
Web Applications
Presentation Layer: Web browser (e.g., Chrome, Firefox).
Application Layer: Web server and backend application (Node.js, Django, Spring Boot).
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).
The backend API handles user authentication and post creation (application layer).
Gaming Applications
Presentation Layer: Game client (e.g., Unity or Unreal Engine).
Data Layer: Database for storing player profiles and game data.
The game server manages player interactions and game logic (application layer).
01110011010011100101001010100101010010101…..
© Virtual University of Pakistan
1. Internal Level (Physical View)
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.
2. Conceptual Level (Logical View)
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.
3. External Level (User View)
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.
Interactions between Levels
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
Types of DBMS
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 (Cont.)
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.)
7. Time-Series Databases: Optimized for storing and querying time-stamped
data.
Example: InfluxDB, TimescaleDB