03_Database_Architectures
03_Database_Architectures
Management
systems
Lecturer 3:
Database Architectures
and the Web
(Adopted from Connoly&Begg: Database systems)
File-server
Client-server
Teleprocessing
Traditionalarchitecture.
Single mainframe (CPU) with a number of terminals
attached.
Teleprocessing cont…
Allprocessing is performed within the boundaries of
the same physical computer
terminals are typically “dumb”
terminals send messages via the communications
control subsystem of the operating system to the
user’s application program, which in turn uses the
services of the DBMS. In the same way, messages are
routed back to the user’s terminal.
Unfortunately, this architecture placed a
tremendous burden on the central computer, which
had to not only run the application programs and
the DBMS, but also carry out a significant amount of
work on behalf of the terminals
File-Server Architecture
File-Server
A computer attached to a network with the primary purpose of providing
shared storage for computer files such as documents, spreadsheets, images,
and databases
File-server is connected to several workstations across a
network.
Database resides on file-server.
DBMS and applications run on each workstation.
Disadvantages include:
Significant network traffic.
Copy of DBMS on each workstation.
Concurrency, recovery and integrity control more complex.
Traditional Two-Tier Client-
Server
Traditional Two-Tier Client-
Server
Client (tier 1) manages user interface and runs
applications.
Server (tier 2) holds database and DBMS.
Advantages include:
wider access to existing databases;
increased performance;
possible reduction in hardware costs;
reduction in communication costs;
increased consistency.
Traditional Two-Tier Client-
Server
Alternative client–server topologies:
Summary of Client-Server
Functions
Three-Tier Client-Server
The need for enterprise scalability challenged
the traditional two-tier client–server model.
Client side presented two problems preventing
true scalability:
‘Fat’ client, requiring considerable resources on
client’s computer to run effectively.
Significant client side administration overhead.
The three-tier
architecture can be
expanded to n tiers, with
additional tiers providing
more flexibility and
scalability.
Applications servers host
API to expose business
logic and business
processes for use by
other applications.
Application servers
Hosts an application programming interface
(API) to expose business logic and business
processes for use by other applications
An application server must handle a number
of complex issues:
concurrency;
network connection management;
providing access to all the database servers;
database connection pooling;
legacy database support;
clustering support;
load balancing;
failover.
Middleware
Computer software that connects
software components or Middleware
applications.
Middleware is a generic term used to
describe software that mediates with
other software and allows for
communication between disparate
applications in a heterogeneous system
The need for middleware arises when
distributed systems become too complex
to manage efficiently without a common
interface
Transaction Processing Monitors
Program that controls data transfer between clients and
servers in order to provide a consistent environment,
particularly for Online Transaction Processing (OLTP).
TP Monitors provide significant advantages,
including:
Transaction routing
Managing distributed transactions
Load balancing
Funneling
Increased reliability
TPM as middle tier of 3-tier
client-server
Web Services
Web service:
A software system designed to support
interoperable machine-to- machine
interaction over a network. ( Unlike other Web-based
applications, Web services have no user interface and are not aimed at Web
browsers. Web services instead share business logic, data, and processes
through a programmatic interface across a network)
25
Distributed DBMSs
A DDBMS consists of a single logical database
split into a number of fragments.
Each fragment is stored on one or more
computers (replicas) under the control of a
separate DBMS, with the computers connected
by a network.
Each site is capable of independently
processing user requests that require access to
local data (that is, each site has some degree of
local autonomy) and is also capable of
processing data stored on other computers in
the network.
26
Data Warehousing
A data warehouse was deemed the solution to
meet the requirements of a system capable of
supporting decision making, receiving data from
multiple operational data sources.
27
Cloud Computing
A model for enabling ubiquitous, convenient, on-
demand network access to a shared pool of
configurable computing resources (e.g.,
networks, servers, storage, applications, and
services) that can be rapidly provisioned and
released with minimal management effort or
service provider interaction
Cloud computing is the term given to the use of
multiple servers over a digital network as if they were
one computer. The ‘Cloud’ itself is a virtualization of
resources—networks, servers, applications, data
storage, and services—which the end-user has on-
demand access to
cloud model characteristics
On-demand self-service
Broad network access
Resource pooling.
Rapid elasticity
Measured service
The three Cloud service
models
Software as a Service (SaaS
Platform as a Service (PaaS).
Infrastructure as a Service (IaaS)
Deployment models for the cloud
Private cloud
Community cloud
Public cloud.
Hybrid cloud.
Benefits of Cloud Computing
Cost-reduction.
Scalability/Agility
Improved security
Improved reliability
Access to new technologies
Faster development
Large-scale prototyping/load testing
More flexible working practices
Increased competitiveness
Risks of Cloud Computing
Network dependency
System dependency
Cloud provider dependency
Lack of control
(Lack of availability-Lack of integrity-Lack of
confidentiality- Lack of intervenability- Lack of
isolation)
Lack of information on processing
(transparency).
Cloud-Based Database Solutions
Asa type of SaaS, cloud-based database
solutions fall into two basic categories:
Data as a Service (DaaS) and Database
as a Service (DBaaS). The key difference
between the two is mainly how the data is
managed:
Components of a DBMS
A DBMS is partitioned into several software
components (or modules), each of which is
assigned a specific operation. As stated
previously, some of the functions of the DBMS
are supported by the underlying operating
system.
The DBMS interfaces with other software
components, such as user queries and access
methods (file management techniques for
storing and retrieving data records).
35
Components of a DBMS
Components of a DBMS
(Continued)
Query processor is a major DBMS component that
transforms queries into a series of low-level
instructions directed to the database manager.
Database manager (DM) interfaces with user-
submitted application programs and queries. The DM
examines the external and conceptual schemas to
determine what conceptual records are required to
satisfy the request. The DM then places a call to the
file manager to perform the request.
37
Components of a DBMS
(Continued)
Filemanager manipulates the underlying
storage files and manages the allocation of
storage space on disk. It establishes and
maintains the list of structures and indexes
defined in the internal schema.
DML preprocessor converts DML statements
embedded in an application program into
standard function calls in the host language.
The DML preprocessor must interact with the
query processor to generate the appropriate
code.
38
Components of a DBMS
(Continued)
DDL compiler converts DDL statements into a
set of tables containing metadata. These
tables are then stored in the system catalog
while control information is stored in data file
headers.
Catalog manager manages access to and
maintains the system catalog. The system
catalog is accessed by most DBMS
components.
39
Components of Database Manager (DM)
Components of the Database
Manager
Authorization control to confirm whether the
user has the necessary permission to carry out
the required operation.
Command processor on confirmation of user
authority, control is passed to the command
processor.
Integrity checker ensures that requested
operation satisfies all necessary integrity
constraints (e.g. key constraints) for an
operation that changes the database.
41
Components of the Database
Manager (Continued)
Query optimizer determines an optimal
strategy for the query execution.
Transaction manager performs the required
processing of operations that it receives from
transactions.
Scheduler ensures that concurrent operations
on the database proceed without conflicting
with one another. It controls the relative order
in which transaction operations are executed.
42
Components of the Database
Manager (Continued)
Recovery manager ensures that the database
remains in a consistent state in the presence of
failures. It is responsible for transaction commit
and abort.
Buffer manager responsible for the transfer of
data between main memory and secondary
storage, such as disk and tape.
The recovery manager and the buffer manager
also known as (aka) the data manager. The
buffer manager aka the cache manager.
43
Any Questions???