What is a Distributed Database System? What is not a DDBS ...

5
28/09/16 1 Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/1 Principles of Distributed Database Systems Özsu, M. Tamer, Valduriez, Patrick, 3rd ed. 2011 What is a distributed DBMS? Distributed DBMS Architecture Ch. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/2 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 Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/3 What is not a DDBS? A timesharing computer system A loosely or tightly coupled multiprocessor system A database system which resides at one of the nodes of a network of computers - this is a centralized database on a network node Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/4 Centralized DBMS on a Network Site 5 Site 1 Site 2 Site 3 Site 4 Communication Network Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/5 Distributed DBMS Environment Site 5 Site 1 Site 2 Site 3 Site 4 Communication Network Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/6 Implicit Assumptions Data stored at a number of sites ! each site logically consists of a single processor. Processors at different sites are interconnected by a computer network ! not a multiprocessor system Parallel database systems Distributed database is a database, not a collection of files ! data logically related as exhibited in the users’ access patterns Relational data model D-DBMS is a full-fledged DBMS Not remote file system, not a TP system

Transcript of What is a Distributed Database System? What is not a DDBS ...

Page 1: What is a Distributed Database System? What is not a DDBS ...

28/09/16

1

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/1

Principles of Distributed Database Systems�Özsu, M. Tamer, Valduriez, Patrick, 3rd ed. 2011�

What is a distributed DBMS?

Distributed DBMS Architecture

Ch.x/1

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/2

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

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/3

What is not a DDBS?�

• A timesharing computer system

• A loosely or tightly coupled multiprocessor system

• A database system which resides at one of the nodes of a network of computers - this is a centralized database on a network node

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/4

Centralized DBMS on a Network�

Site 5

Site 1

Site 2

Site 3 Site 4

Communication Network

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/5

Distributed DBMS Environment�

Site 5

Site 1

Site 2

Site 3 Site 4

Communication Network

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/6

Implicit Assumptions�

• Data stored at a number of sites ! each site logically consists of a single processor.

• Processors at different sites are interconnected by a computer network ! not a multiprocessor system

➡  Parallel database systems

• Distributed database is a database, not a collection of files ! data logically related as exhibited in the users’ access patterns ➡  Relational data model

• D-DBMS is a full-fledged DBMS ➡  Not remote file system, not a TP system

Page 2: What is a Distributed Database System? What is not a DDBS ...

28/09/16

2

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/7

Data Delivery Alternatives�

• Delivery modes ➡  Pull-only

➡  Push-only

➡  Hybrid

• Frequency ➡  Periodic

➡  Conditional

➡  Ad-hoc or irregular

• Communication Methods

➡  Unicast

➡  One-to-many

• Note: not all combinations make sense

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/8

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

Ch.x/8

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/9

Transparency�

• Transparency is the separation of the higher level semantics of a system from the lower level implementation issues.

• Fundamental issue is to provide data independence

in the distributed environment

➡  Network (distribution) transparency

➡  Replication transparency

➡  Fragmentation transparency ✦  horizontal fragmentation: selection ✦  vertical fragmentation: projection ✦  hybrid

Ch.x/9

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/10

Example�

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/11

Transparent Access�

SELECT ENAME,SAL

FROM EMP,ASG,PAY

WHERE DUR > 12

AND EMP.ENO = ASG.ENO

AND PAY.TITLE = EMP.TITLE

Paris projects Paris employees

Paris assignments Boston employees

Montreal projects Paris projects

New York projects with budget > 200000

Montreal employees Montreal assignments

Boston

Communication Network

Montreal

Paris

New York

Boston projects Boston employees

Boston assignments

Boston projects New York employees

New York projects New York assignments

Tokyo

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/12

Distributed Database - User View�

Distributed Database

Page 3: What is a Distributed Database System? What is not a DDBS ...

28/09/16

3

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/13

Distributed DBMS - Reality�

Communication Subsystem

DBMS Software

User Application User

Query

DBMS Software

DBMS Software

DBMS Software

User Query

DBMS Software

User Query

User Application

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/14

Types of Transparency�

• Data independence

• Network transparency (or distribution transparency)

➡  Location transparency

➡  Fragmentation transparency

• Replication transparency

• Fragmentation transparency

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/15

Reliability Through Transactions�

• Replicated components and data should make distributed DBMS more reliable.

• Distributed transactions provide ➡  Concurrency transparency

➡  Failure atomicity

• Distributed transaction support requires implementation of

➡  Distributed concurrency control protocols

➡  Commit protocols

• Data replication

➡  Great for read-intensive workloads, problematic for updates

➡  Replication protocols

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/16

Potentially Improved Performance�• Proximity of data to its points of use

➡  Requires some support for fragmentation and replication

• Parallelism in execution

➡  Inter-query parallelism

➡  Intra-query parallelism

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/17

Parallelism Requirements�

• Have as much of the data required by each application at the site where the application executes

➡  Full replication

• How about updates?

➡  Mutual consistency

➡  Freshness of copies

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/18

Distributed DBMS Issues�

• Distributed Database Design

➡  How to distribute the database

➡  Replicated & non-replicated database distribution

➡  A related problem in directory management

• Query Processing

➡  Convert user transactions to data manipulation instructions

➡  Optimization problem

✦  min{cost = data transmission + local processing}

➡  General formulation is NP-hard

Page 4: What is a Distributed Database System? What is not a DDBS ...

28/09/16

4

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/19

Distributed DBMS Issues�

• Concurrency Control

➡  Synchronization of concurrent accesses

➡  Consistency and isolation of transactions' effects

➡  Deadlock management

•  Reliability

➡  How to make the system resilient to failures

➡  Atomicity and durability

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/20

Directory Management

Relationship Between Issues�

Reliability

Deadlock Management

Query Processing

Concurrency Control

Distribution Design

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/22

Architecture�

• Defines the structure of the system

➡  components identified

➡  functions of each component defined

➡  interrelationships and interactions between components defined

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/23

ANSI/SPARC Architecture�

External Schema

Conceptual Schema

Internal Schema

Internal view

Users

External view

Conceptual view

External view

External view

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/24

DBMS Implementation Alternatives�

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/25

Dimensions of the Problem�

• Distribution ➡  Whether the components of the system are located on the same machine or not

• Heterogeneity ➡  Various levels (hardware, communications, operating system) ➡  DBMS important one

✦  data model, query language,transaction management algorithms

• Autonomy ➡  Not well understood and most troublesome ➡  Various versions

✦  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.

Page 5: What is a Distributed Database System? What is not a DDBS ...

28/09/16

5

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/26

Distributed Database Servers�

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/27

Datalogical Distributed DBMS Architecture�

...

...

...

ES1 ES2 ESn

Global Conceptual Schema

LCS1 LCS2 LCSn

LIS1 LIS2 LISn

External schemas

Local conceptual schemas

Local internal schemas

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/28

Datalogical Multi-DBMS Architecture �

...

GCS … …

GES1

LCS2 LCSn …

… LIS2 LISn

LES11 LES1n LESn1 LESnm

GES2 GESn

LIS1

LCS1

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/29

MDBS Components & Execution�

Multi-DBMS Layer

DBMS1 DBMS3 DBMS2

Global User

Request

Local User

Request Global

Subrequest Global

Subrequest Global

Subrequest

Local User

Request

Distributed DBMS © M. T. Özsu & P. Valduriez Ch.1/30

Mediator/Wrapper Architecture�