Professional Documents
Culture Documents
Ali Samad
Architecture
Ali Samad
Tahir Rashid DDBMS Architecture 2
Architecture
• Goal:
– present the issues that need to be addressed at
design
– present a framework within which the design and
implementation issues can be discussed
• The ISO/OSI 7-layered reference model
for computer networks
Ali Samad
Tahir Rashid DDBMS Architecture 3
Standardization
Reference Model
– A conceptual framework whose purpose is to divide
standardization work into manageable pieces and to show at a
general level how these pieces are related to one another.
A reference model can be described according to three
different approaches:
• Based on components
• Based on functions
• Based on data
Ali Samad
Tahir Rashid DDBMS Architecture 4
DBMS STANDARDIZATION
• Based on components.
The components of the system are defined together with the
interrelationships between components. A DBMS consists of a
number of components, each of which provides some functionality.
• Based on functions.
The different classes of users are identified and the functions that
the system will perform for each class are defined. The system
specifications within this category typically specify a hierarchical
structure for the user classes. The ISO/OSI architecture fall in this
category.
Ali Samad
Tahir Rashid DDBMS Architecture 5
DBMS STANDARDIZATION
• Based on data.
The different types of data are identified, and an architectural
framework is specified which defines the functional units that will
realize or use data according to these different views. This approach
(also referred as the data logical approach) is claimed to be the
preferable choice for standardization activities.
Ali Samad
Tahir Rashid DDBMS Architecture 6
DBMS STANDARDIZATION
ANSI / SPARC ARCHITECTURE
The ANSI / SPARC architecture is claimed to be based
on the data organization. It recognizes three views of
data:
the external view, which is that of the user, who might be
a programmer; the internal view, that of the system or
machine; and the conceptual view, that of the enterprise.
Ali Samad
Tahir Rashid DDBMS Architecture 7
DBMS STANDARDIZATION
ANSI / SPARC ARCHITECTURE
Ali Samad
Tahir Rashid DDBMS Architecture 8
DBMS STANDARDIZATION
ANSI / SPARC ARCHITECTURE
• At the lowest level of the architecture is the internal view,
which deals with the physical definition and organization
of data.
⇓
INTERNAL_REL EMPL [
INDEX ON E# CALL EMINX
FIELD = {
HEADER : BYTE(1)
E# : BYTE(9)
ENAME : BYTE(15)
TIT : BYTE(10)
}
]
Ali Samad
Tahir Rashid DDBMS Architecture 12
External View Definition –
Example 1
Ali Samad
Tahir Rashid DDBMS Architecture 13
External View Definition –
Example 2
Create a Payroll view from relations EMP and TITLE_SALARY
Ali Samad
Tahir Rashid DDBMS Architecture 14
DBMS STANDARDIZATION
ANSI / SPARC ARCHITECTURE
Ali Samad
Tahir Rashid DDBMS Architecture 15
DBMS STANDARDIZATION
ANSI / SPARC ARCHITECTURE
Ali Samad
Tahir Rashid DDBMS Architecture 17
ARCHITECTURAL MODELS FOR
DISTRIBUTED DBMSs
Ali Samad
Tahir Rashid DDBMS Architecture 19
Autonomy
• Distribution of control (and not data) - the degree of
independence
– The local operations of the individual DBMSs are not
affected by their participation in the multidatabase system
– The manner in which individual DBMSs process queries
and optimize them should not be affected by the
execution of global queries
– System consistency should not be compromised when
individual DBMSs join or leave the multidatabase system
Ali Samad
Tahir Rashid DDBMS Architecture 20
Autonomy
• On the other hand specifies the dimension
of autonomy as:
• Design autonomy: Ability of a component DBMS
to decide on issues related to its own design.
• Communication autonomy: Ability of a
component DBMS to decide whether and how to
communicate with other DBMSs.
• Execution autonomy: Ability of a component
DBMS to execute local operations in any manner it
wants to.
Ali Samad
Tahir Rashid DDBMS Architecture 21
Autonomy
• Possibilities:
– Tight integration – a single-image of the entire
database is available to any user who wants to share
the information, which may reside in multiple
databases.
– Semiautonomous system – consist of DBMSs that
can operate independently, but have decided to
participate in a federation to make their local data
sharable.
– Total isolation – the individual systems are stand-
alone DBMSs, which know neither of the existence of
other DBMSs nor how to communicate with them.
Ali Samad
Tahir Rashid DDBMS Architecture 22
ARCHITECTURAL MODELS FOR
DISTRIBUTED DBMSs - DISTRIBUTION
Distributions refers to the distributions of data. Of course,
we are considering the physical distribution of data over
multiple sites; the user sees the data as one logical pool.
Two alternatives:
– client / server distribution
– peer-to-peer distribution (full distribution)
Ali Samad
Tahir Rashid DDBMS Architecture 23
ARCHITECTURAL MODELS FOR
DISTRIBUTED DBMSs - DISTRIBUTION
Client / server distribution.
The client / server distribution concentrates data management
duties at servers while the clients focus on providing the application
environment including the user interface. The communication duties
are shared between the client machines and servers. Client / server
DBMSs represent the first attempt at distributing functionality.
Peer-to-peer distribution.
There is no distinction of client machines versus servers. Each
machine has full DBMS functionality and can communicate with
other machines to execute queries and transactions.
Ali Samad
Tahir Rashid DDBMS Architecture 24
ARCHITECTURAL MODELS FOR
DISTRIBUTED DBMSs - DISTRIBUTION
Client / server distribution.
The client / server distribution concentrates data management
duties at servers while the clients focus on providing the application
environment including the user interface. The communication duties
are shared between the client machines and servers. Client / server
DBMSs represent the first attempt at distributing functionality.
Peer-to-peer distribution.
There is no distinction of client machines versus servers. Each
machine has full DBMS functionality and can communicate with
other machines to execute queries and transactions.
Ali Samad
Tahir Rashid DDBMS Architecture 25
ARCHITECTURAL MODELS FOR
DISTRIBUTED DBMSs - HETEROGENEITY
Heterogeneity may occur in various forms in distributed
systems, ranging form hardware heterogeneity and
differences in networking protocols to variations in data
managers.
Representing data with different modeling tools creates
heterogeneity because of the inherent expressive powers
and limitations of individual data models. Heterogeneity in
query languages not only involves the use of completely
different data access paradigms in different data models,
but also covers differences in languages even when the
individual systems use the same data model.
Ali Samad
Tahir Rashid DDBMS Architecture 26
ARCHITECTURAL MODELS FOR
DISTRIBUTED DBMSs -
HETEROGENEITY
• Various levels (hardware,
communications, operating system)
• DBMS important one – data model, query
language, transaction management algorithms
• Representing data with different modeling tools
creates heterogeneity because of the inherent
expressive power and limitations of individual data
models.
Ali Samad
Tahir Rashid DDBMS Architecture 27
ARCHITECTURAL MODELS FOR
DISTRIBUTED DBMSs - ALTERNATIVES
The dimensions are identified as:
A (autonomy),
D (distribution) and
H (heterogeneity).
Ali Samad
Tahir Rashid DDBMS Architecture 28
ARCHITECTURAL MODELS FOR DISTRIBUTED
DBMSs - ALTERNATIVES
A0 - tight integration
A1 - semiautonomous systems
A2 - total isolation
H0 - homogeneous systems
H1 - heterogeneous systems
D0 - no distribution
D1 - client / server systems
D2 - peer-to-peer systems
Ali Samad
Tahir Rashid DDBMS Architecture 29
ARCHITECTURAL MODELS FOR
DISTRIBUTED DBMSs
Ali Samad
Tahir Rashid DDBMS Architecture 30
Alternatives in Distributed Database
Systems
Distribution
Distributed
Peer-to-peer
multi-DBMS
Distributed DBMS
Client/server
Autonomy
Multi-DBMS
Federated DBMS
Heterogeneity
Tahir
Ali Rashid
Samad DDBMS Architecture 31
ARCHITECTURAL MODELS FOR DISTRIBUTED
DBMSs - ALTERNATIVES
Ali Samad
Tahir Rashid DDBMS Architecture 32
ARCHITECTURAL MODELS FOR
DISTRIBUTED DBMSs - ALTERNATIVES
(A0, D0, H0)
If there is no distribution or heterogeneity, the system is a set of
multiple DBMSs that are logically integrated. Such systems can be
given generic name composite systems. Not such examples but
they may be suitable for shared everything multiprocessor systems.
(A0, D0, H1)
If heterogeneity is introduced, one has multiple data managers that
are heterogeneous but provide an integrated view to the user.
(A0, D1, H0)
The more interesting case is where the database is distributed even
though an integrated view of the data is provided to users (client /
server distribution). Mentioned earlier and will discuss further.
Ali Samad
Tahir Rashid DDBMS Architecture 33
ARCHITECTURAL MODELS FOR
DISTRIBUTED DBMSs - ALTERNATIVES
(A0, D2, H0)
The same type of transparency is provided to the user in a fully
distributed environment. There is no distinction among clients and
servers, each site providing identical functionality.
(A1, D0, H0)
These are semiautonomous systems, which are commonly termed
federated DBMS. The component systems in a federated
environment have significant autonomy in their execution, but their
participation in the federation indicate that they are willing to
cooperate with other in executing user requests that access multiple
databases. An example may be multiple installations of an DBMS.
Ali Samad
Tahir Rashid DDBMS Architecture 34
ARCHITECTURAL MODELS FOR
DISTRIBUTED DBMSs - ALTERNATIVES
Ali Samad
Tahir Rashid DDBMS Architecture 36
Data logical Distributed DBMS
Architecture
Ali Samad
Tahir Rashid DDBMS Architecture 37
Datalogical Multi-DBMS Architecture
GES1 GES2 ... GESn
Ali Samad
Tahir Rashid DDBMS Architecture 39
Figure 13-10 – Distributed DBMS architecture
Ali Samad
Tahir Rashid DDBMS Architecture 40
Local Transaction Steps
1. Application makes request to distributed
DBMS
2. Distributed DBMS checks distributed data
repository for location of data. Finds that it is
local
3. Distributed DBMS sends request to local
DBMS
4. Local DBMS processes request
5. Local DBMS sends results to application
Ali Samad
Tahir Rashid DDBMS Architecture 41
Figure 13-10: Distributed DBMS Architecture (cont.)
(showing local transaction steps)
3 5
4
Local transaction –
all data stored locally
Ali Samad
Tahir Rashid DDBMS Architecture 42
Global Transaction Steps
1. Application makes request to distributed DBMS
2. Distributed DBMS checks distributed data repository for location of data.
Finds that it is remote
3. Distributed DBMS routes request to remote site
4. Distributed DBMS at remote site translates request for its local DBMS if
necessary, and sends request to local DBMS
5. Local DBMS at remote site processes request
6. Local DBMS at remote site sends results to distributed DBMS at remote
site
7. Remote distributed DBMS sends results back to originating site
8. Distributed DBMS at originating site sends results to application
Ali Samad
Tahir Rashid DDBMS Architecture 43
Figure 13-10: Distributed DBMS architecture (cont.)
(showing global transaction steps)
2
3
1
7 6
8
4
Ali Samad
Tahir Rashid DDBMS Architecture 45
The Client/Server Database
Environment
Ali Samad
Client/Server Systems
• Networked computing model
• Processes distributed between clients and
servers
• Client – Workstation (usually a PC) that requests
and uses a service
• Server – Computer (PC/mini/mainframe) that
provides a service
• For DBMS, server is a database server
Ali Samad
Tahir Rashid DDBMS Architecture 47
Application Logic in C/S
Systems
• Presentation Logic
– Input – keyboard/mouse
– Output – monitor/printer
GUI Interface
• Processing Logic
– I/O processing
– Business rules Procedures, functions,
– Data management programs
• Storage Logic
– Data storage/retrieval DBMS activities
Ali Samad
Tahir Rashid DDBMS Architecture 48
Client/Server Architectures
• Three-tier Architecture
Ali Samad
Tahir Rashid DDBMS Architecture 49
File Server Architecture
Ali Samad
Tahir Rashid DDBMS Architecture 50
File Server Architecture
Ali Samad
Tahir Rashid DDBMS Architecture 51
Database Server Architectures
• 2-tiered approach
• Client is responsible for
– I/O processing logic
– Some business rules logic
• Server performs all data storage and access processing
DBMS is only on server
• Advantages
– Clients do not have to be as powerful
– Greatly reduces data traffic on the network
– Improved data integrity since it is all processed centrally
– Stored procedures some business rules done on server
Ali Samad
Tahir Rashid DDBMS Architecture 52
Advantages of Stored Procedures
Ali Samad
Tahir Rashid DDBMS Architecture 53
Database server architecture
DBMS only
on server
Ali Samad
Tahir Rashid DDBMS Architecture 54
Three-Tier Architectures
• Three layers: GUI interface
– Client (I/O processing) Browser
– Application server Business rules Web Server
– Database server Data storage
DBMS
Thin Client
PC just for user interface and a little application
processing. Limited or no data storage (sometimes no
hard drive)
Ali Samad
Tahir Rashid DDBMS Architecture 55
Three-tier architecture
Thinnest
clients
Business
rules on
separate
server
DBMS only on
DB server
Ali Samad
Tahir Rashid DDBMS Architecture 56
DISTRIBUTED DBMS ARCHITECTURE
CLIENT / SERVER SYSTEMS
• This architecture is
quite common in
relational systems
where the
communication
between the clients and
the server(s) is at the
level of SQL
statements.
Ali Samad
Tahir Rashid DDBMS Architecture 58
DISTRIBUTED DBMS ARCHITECTURE
CLIENT / SERVER SYSTEMS
Ali Samad
Tahir Rashid DDBMS Architecture 59
DISTRIBUTED DBMS ARCHITECTURE
CLIENT / SERVER SYSTEMS
Ali Samad
Tahir Rashid DDBMS Architecture 60
Multiple Clients/Single Server
LAN
High-level Filtered
requests data only
Communications
DBMS Services
Database
Ali Samad
Tahir Rashid DDBMS Architecture 61
Task Distribution
Application
QL Programmatic
Interface … Interface
Communications Manager
SQL result
query table
Communications Manager
Query Optimizer
Lock Manager
Storage Manager
Page & Cache Manager
Database
Ali Samad
Tahir Rashid DDBMS Architecture 62
Advantages of Client-Server
Architectures
• More efficient division of labor
• Better price/performance on client machines
• Ability to use familiar tools on client machines
• Client access to remote data (via standards)
• Full DBMS functionality provided to client workstations
• Overall better system price/performance
Ali Samad
Tahir Rashid DDBMS Architecture 63
Problems With Multiple-
Client/Single Server
Ali Samad
Tahir Rashid DDBMS Architecture 64
Multiple Clients/Multiple Servers
• directory Applications
• caching Client
Services
• query decomposition
Communications
• commit protocols
LAN
Communications Communications
Database Database
Ali Samad
Tahir Rashid DDBMS Architecture 65
Server-to-Server
LAN
Communications Communications
Database Database
Ali Samad
Tahir Rashid DDBMS Architecture 66
DISTRIBUTED DBMS ARCHITECTURE
PEER-TO-PEER DISTRIBUTED SYSTEMS
Ali Samad
Tahir Rashid DDBMS Architecture 67
DISTRIBUTED DBMS ARCHITECTURE
PEER-TO-PEER DISTRIBUTED SYSTEMS
Ali Samad
Tahir Rashid DDBMS Architecture 68
DISTRIBUTED DBMS ARCHITECTURE
PEER-TO-PEER DISTRIBUTED SYSTEMS
Tahir
Ali Rashid
Samad DDBMS Architecture 69
DISTRIBUTED DBMS ARCHITECTURE
PEER-TO-PEER DISTRIBUTED SYSTEMS
Ali Samad
Tahir Rashid DDBMS Architecture 70
DISTRIBUTED DBMS ARCHITECTURE
PEER-TO-PEER DISTRIBUTED SYSTEMS
The detailed
components of a
distributed
DBMS.
Two major
components:
– user processor
– data processor
Ali Samad
Tahir Rashid DDBMS Architecture 71
Ali Samad
Tahir Rashid DDBMS Architecture 72
DISTRIBUTED DBMS ARCHITECTURE
PEER-TO-PEER DISTRIBUTED SYSTEMS
User processor
• user interface handler - is responsible for interpreting user
commands as they come in, and formatting the result data as it is
sent to the user,
• semantic data controller - uses the integrity constraints and
authorizations that are defined as part of the global conceptual
schema to check if the user query can be processed,
• global query optimizer and decomposer - determines an
execution strategy to minimize a cost function, and translates the
global queries in local ones using the global and local conceptual
schemas as well as global directory,
• distributed execution monitor - coordinates the distributed
execution of the user request.
Tahir Rashid DDBMS Architecture 73
Ali Samad
DISTRIBUTED DBMS ARCHITECTURE
PEER-TO-PEER DISTRIBUTED SYSTEMS
Data processor
• local query optimizer - is responsible for choosing the best
access path to access any data item,
• local recovery manager - is responsible for making sure that the
local database remains consistent even when failures occur,
• run-time support processor - physically accesses the database
according to the physical commands in the schedule generated by
the query optimizer. This is the interface to the operating system
and contains the database buffer (or cache) manager, which is
responsible for maintaining the main memory buffers and managing
the data accesses.
Ali Samad
Tahir Rashid DDBMS Architecture 74
Peer-to-Peer
Component Architecture
USER PROCESSOR DATA PROCESSOR
Local Recovery
Database
Global Query
Local Query
Controller
Execution
Processor
Optimizer
Processor
Handler
Manager
Runtime
Monitor
Support
USER Global
System
responses
Ali Samad
Tahir Rashid DDBMS Architecture 75