Outline: What Is A Distributed DBMS Problems Current State-Of-Affairs

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Outline

n  Introduction & architectural issues


l  What is a distributed DBMS
l  Problems
l  Current state-of-affairs
q  Data distribution
q  Distributed query processing
q  Distributed query optimization
q  Distributed transactions & concurrency control
q  Distributed reliability
q  Database replication
q  Parallel database systems
q  Database integration & querying
q  Advanced topics

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.1

File Systems

program 1
File 1
data description 1

program 2
data description 2 File 2

program 3
data description 3 File 3

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.2

Page 1
Database Management

Application
program 1
(with data
semantics)
DBMS

description
Application
program 2 manipulation
(with data database
semantics) control

Application
program 3
(with data
semantics)

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.3

Motivation

Database Computer
Technology Networks
integration distribution

Distributed
Database
Systems
integration

integration ≠ centralization
CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.4

Page 2
Distributed Computing
n  A number of autonomous processing elements
(not necessarily homogeneous) that are
interconnected by a computer network and
that cooperate in performing their assigned
tasks.
n  What is being distributed?
l  Processing logic
l  Function
l  Data
l  Control

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.5

What is a Distributed Database


System?
A distributed database (DDB) is a collection of multiple,
logically interrelated databases distributed over a
computer network.

A distributed database management system (D–DBMS)


is the software that manages the DDB and provides an
access mechanism that makes this distribution
transparent to the users.

Distributed database system (DDBS) = DDB + D–DBMS

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.6

Page 3
What is not a DDBS?
n  A timesharing computer system
n  A loosely or tightly coupled multiprocessor
system
n  A database system which resides at one of the
nodes of a network of computers - this is a
centralized database on a network node

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.7

Centralized DBMS on a
Network

Site 1
Site 2

Site 5

Communication
Network

Site 4 Site 3

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.8

Page 4
Distributed DBMS
Environment

Site 1
Site 2

Site 5
Communication
Network

Site 4 Site 3

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.9

Implicit Assumptions
n  Data stored at a number of sites à each site
logically consists of a single processor.
n  Processors at different sites are interconnected
by a computer network à not a multiprocessor
system
l  Parallel database systems
n  Distributed database is a database, not a
collection of files à data logically related as
exhibited in the users’ access patterns
l  Relational data model
n  D-DBMS is a full-fledged DBMS
l  Not remote file system, not a TP system

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.10

Page 5
Data Delivery Alternatives
n  Delivery modes
l  Pull-only
l  Push-only
l  Hybrid
n  Frequency
l  Periodic
l  Conditional
l  Ad-hoc or irregular
n  Communication Methods
l  Unicast
l  One-to-many
n  Note: not all combinations make sense

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.11

Distributed DBMS Promises


Œ Transparent management of distributed,
fragmented, and replicated data

 Improved reliability/availability through


distributed transactions

Ž Improved performance

 Easier and more economical system expansion

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.12


Ch.x/
12

Page 6
Transparency
n  Transparency is the separation of the higher
level semantics of a system from the lower
level implementation issues.
n  Fundamental issue is to provide
data independence
in the distributed environment
l  Network (distribution) transparency

l  Replication transparency

l  Fragmentation transparency


u  horizontal fragmentation: selection
u  vertical fragmentation: projection
u  hybrid

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.13


Ch.x/
13

Example

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.14

Page 7
Transparent Access

SELECT ENAME,SAL
Tokyo
FROM EMP,ASG,PAY
WHERE DUR > 12
Boston Paris
AND EMP.ENO = ASG.ENO
Paris projects
AND PAY.TITLE = EMP.TITLE Paris employees
Communication Paris assignments
Network Boston employees

Boston projects
Boston employees
Boston assignments
Montreal
New
Montreal projects
York Paris projects
Boston projects New York projects
New York employees with budget > 200000
New York projects Montreal employees
New York assignments Montreal assignments

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.15

Distributed Database - User


View

Distributed Database

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.16

Page 8
Distributed DBMS - Reality
User
Query

DBMS User
Application
Software
DBMS
Software

DBMS Communication
Software Subsystem

User
DBMS User Application
Software Query
DBMS
Software

User
Query

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.17

Types of Transparency
n  Data independence
n  Network transparency (or distribution
transparency)
l  Location transparency
l  Fragmentation transparency
n  Replication transparency
n  Fragmentation transparency

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.18

Page 9
Reliability Through
Transactions

n  Replicated components and data should make distributed


DBMS more reliable.
n  Distributed transactions provide
l  Concurrency transparency
l  Failure atomicity
• Distributed transaction support requires implementation of
l  Distributed concurrency control protocols
l  Commit protocols
n  Data replication
l  Great for read-intensive workloads, problematic for updates
l  Replication protocols

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.19

Potentially Improved
Performance

n  Proximity of data to its points of use


l  Requires some support for fragmentation and replication

n  Parallelism in execution


l  Inter-query parallelism

l  Intra-query parallelism

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.20

Page 10
Parallelism Requirements
n  Have as much of the data required by each
application at the site where the application
executes
l  Full replication

n  How about updates?


l  Mutual consistency

l  Freshness of copies

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.21

System Expansion
n  Issue is database scaling

n  Emergence of microprocessor and workstation


technologies
l  Demise of Grosh's law

l  Client-server model of computing

n  Data communication cost vs


telecommunication cost

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.22

Page 11
Distributed DBMS Issues
n  Distributed Database Design
l  How to distribute the database
l  Replicated & non-replicated database distribution
l  A related problem in directory management

n  Query Processing


l  Convert user transactions to data manipulation
instructions
l  Optimization problem
u  min{cost = data transmission + local processing}
l  General formulation is NP-hard

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.23

Distributed DBMS Issues


n  Concurrency Control
l  Synchronization of concurrent accesses
l  Consistency and isolation of transactions' effects
l  Deadlock management

n  Reliability
l  How to make the system resilient to failures
l  Atomicity and durability

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.24

Page 12
Relationship Between Issues

Directory
Management

Query Distribution
Reliability
Processing Design

Concurrency
Control

Deadlock
Management
CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.25

Related Issues
n  Operating System Support
l  Operating system with proper support for database
operations
l  Dichotomy between general purpose processing
requirements and database processing requirements
n  Open Systems and Interoperability
l  Distributed Multidatabase Systems
l  More probable scenario
l  Parallel issues

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.26

Page 13
Architecture
n  Defines the structure of the system
l  components identified

l  functions of each component defined


l  interrelationships and interactions between components
defined

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.27

ANSI/SPARC Architecture

Users

External External External External


Schema view view view

Conceptual Conceptual
view
Schema

Internal Internal view


Schema

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.28

Page 14
Generic DBMS Architecture

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.29

DBMS Implementation
Alternatives

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.30

Page 15
Dimensions of the Problem
n  Distribution
l  Whether the components of the system are located on the same
machine or not
n  Heterogeneity
l  Various levels (hardware, communications, operating system)
l  DBMS important one
u  data model, query language,transaction management algorithms
n  Autonomy
l  Not well understood and most troublesome
l  Various versions
u  Design autonomy: Ability of a component DBMS to decide on
issues related to its own design.
u  Communication autonomy: Ability of a component DBMS to
decide whether and how to communicate with other DBMSs.
u  Execution autonomy: Ability of a component DBMS to execute
local operations in any manner it wants to.

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.31

Client/Server Architecture

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.32

Page 16
Advantages of Client-Server
Architectures

n  More efficient division of labor


n  Horizontal and vertical scaling of resources
n  Better price/performance on client machines
n  Ability to use familiar tools on client machines
n  Client access to remote data (via standards)
n  Full DBMS functionality provided to client
workstations
n  Overall better system price/performance

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.33

Database Server

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.34

Page 17
Distributed Database
Servers

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.35

Datalogical Distributed
DBMS Architecture

ES1 ES2 ... ESn

GCS

LCS1 LCS2 ... LCSn

LIS1 LIS2 ... LISn

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.36

Page 18
Peer-to-Peer Component
Architecture
USER PROCESSOR DATA PROCESSOR

Global Local System Local


External
Conceptual Conceptual Log Internal
Schema Schema GD/D Schema Schema
User
requests Database
Semantic Data
User Interface

Local Recovery
Global Query

Local Query
Controller

Optimizer

Execution
Handler

Processor

Processor
Manager

Runtime
Monitor

Support
Global
USER

System
responses

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.37

Datalogical Multi-DBMS
Architecture

GES1 GES2 ... GESn

LES11 … LES1n GCS LESn1 … LESnm

LCS1 LCS2 … LCSn

LIS1 LIS2 … LISn

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.38

Page 19
MDBS Components & Execution
Global
User
Request

Local Local
User Multi-DBMS User
Request Layer Request
Global Global Global
Subrequest Subrequest Subrequest

DBMS1 DBMS2 DBMS3

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.39

Mediator/Wrapper Architecture

CS742 – Distributed & Parallel DBMS M. Tamer Özsu Page 1.40

Page 20

You might also like