outline - university of winnipegion.uwinnipeg.ca/~ychen2/distributedb/architecture.pdf · 2004. 2....

23
Distributed DBMS Page 4. 1 Outline Introduction Background Distributed DBMS Architecture Datalogical Architecture Implementation Alternatives Component Architecture Distributed DBMS Architecture Distributed Database Design Semantic Data Control Distributed Query Processing Distributed Transaction Management Parallel Database Systems Distributed Object DBMS Database Interoperability Current Issues

Upload: others

Post on 12-Dec-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 1

Outline� Introduction� Background❏ Distributed DBMS Architecture

➠ Datalogical Architecture➠ Implementation Alternatives➠ Component Architecture

❏ Distributed DBMS Architecture❏ Distributed Database Design❏ Semantic Data Control❏ Distributed Query Processing❏ Distributed Transaction Management❏ Parallel Database Systems❏ Distributed Object DBMS❏ Database Interoperability ❏ Current Issues

Page 2: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 2

� ✝Defines the structure of the system➠ components identified

➠ functions of each component defined

➠ interrelationships and interactions between components defined

Architecture

Page 3: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 3

ANSI/SPARC Architecture

ExternalSchema

ConceptualSchema

InternalSchema

Internal view

Users

External view

Conceptual view

External view

External view

Page 4: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 4

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.

Approaches➠ Component-based

� Components of the system are defined together with the interrelationships between components.

� Good for design and implementation of the system.➠ Function-based

� Classes of users are identified together with the functionality that the system will provide for each class.

� The objectives of the system are clearly identified. But how do you achieve these objectives?

➠ Data-based� Identify the different types of describing data and specify the

functional units that will realize and/or use data according to these views.

Standardization

Page 5: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 5

RELATION EMP [KEY = {ENO}ATTRIBUTES = {

ENO : CHARACTER(9)ENAME : CHARACTER(15)TITLE : CHARACTER(10)

}]RELATION PAY [

KEY = {TITLE}ATTRIBUTES = {

TITLE : CHARACTER(10)SAL : NUMERIC(6)

}]

Conceptual Schema Definition

Page 6: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 6

RELATION PROJ [KEY = {PNO}ATTRIBUTES = {

PNO : CHARACTER(7)PNAME : CHARACTER(20)BUDGET : NUMERIC(7)

}]RELATION ASG [

KEY = {ENO,PNO}ATTRIBUTES = {

ENO : CHARACTER(9)PNO : CHARACTER(7)RESP : CHARACTER(10)DUR : NUMERIC(3)

}]

Conceptual Schema Definition

Page 7: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 7

RELATION EMP [KEY = {ENO}ATTRIBUTES = {

ENO : CHARACTER(9)ENAME : CHARACTER(15)TITLE : CHARACTER(10)

}]

=========================================

INTERNAL_REL EMPL [INDEX ON E# CALL EMINXFIELD = {

HEADER : BYTE(1)E# : BYTE(9)ENAME : BYTE(15)TIT : BYTE(10)

}]

Internal Schema Definition

Page 8: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 8

Create a BUDGET view from the PROJ relation

CREATE VIEW BUDGET(PNAME, BUD)AS SELECT PNAME, BUDGET

FROM PROJ

External View Definition –Example 1

Page 9: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 9

Create a Payroll view from relations EMP and TITLE_SALARY

CREATE VIEW PAYROLL (ENO, ENAME, SAL)AS SELECT EMP.ENO,EMP.ENAME,PAY.SAL

FROM EMP, PAYWHERE EMP.TITLE = PAY.TITLE

External View Definition –Example 2

Page 10: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 10

DBMS Implementation Alternatives

Distribution

Heterogeneity

Autonomy

Client/server

Peer-to-peerDistributed DBMS

Federated DBMS

Distributedmulti-DBMS

Multi-DBMS

Page 11: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 11

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 12: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 12

Datalogical Distributed DBMS Architecture

...

...

...

ES1 ES2 ESn

GCS

LCS1 LCS2 LCSn

LIS1 LIS2 LISn

Page 13: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 13

Datalogical Multi-DBMS Architecture

...

GCS… …

GES1

LCS2 LCSn…

…LIS2 LISn

LES11 LES1n LESn1 LESnm

GES2 GESn

LIS1

LCS1

Page 14: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 14

Timesharing Access to a Central Database

Communications

DBMS Services

Network

Terminals or PC terminal emulators

Batchrequests

Response

• No data storage

• Host running all software

Application Software

Database

Page 15: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 15

Multiple Clients/Single Server

Communications

ClientServices

Applications

Communications

DBMS Services

LANHigh-levelrequests

Filtereddata only

Communications

ClientServices

Applications

Communications

ClientServices

Applications

Database

Page 16: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 16

Task DistributionApplication

Communications Manager

Communications Manager

Lock Manager

Storage Manager

Page & Cache Manager

Query Optimizer

QLInterface

ProgrammaticInterface…

SQLquery

resulttable

Database

Page 17: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 17

Advantages of Client-Server Architectures

� More efficient division of labor � Horizontal and vertical scaling of resources� 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

Page 18: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 18

Problems With Multiple-Client/Single Server

� Server forms bottleneck � Server forms single point of failure� Database scaling difficult

Page 19: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 19

Multiple Clients/Multiple Servers

Communications

ClientServices

Applications

LAN

� directory� caching� query decomposition� commit protocols

Communications

DBMS Services

Database

Communications

DBMS Services

Database

Page 20: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 20

Server-to-Server

Communications

DBMS Services

LAN

Communications

DBMS Services

� SQL interface� programmatic

interface� other application

support environments

Communications

ClientServices

Applications

Database Database

Page 21: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 21

Peer-to-PeerComponent Architecture

Database

DATA PROCESSORUSER PROCESSOR

USER

Userrequests

Systemresponses

ExternalSchema

Use

r In

terf

ace

Han

dler

GlobalConceptual

Schema

Sem

anti

c D

ata

Con

trol

ler

Glo

bal

Exe

cuti

onM

onit

or

SystemLog

Loca

l Rec

over

yM

anag

er

LocalInternalSchema

Run

tim

eSu

ppor

tP

roce

ssor

Loca

l Que

ryP

roce

ssor

LocalConceptual

Schema

Glo

bal Q

uery

Opt

imiz

er

GD/D

Page 22: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 22

Components of a Multi-DBMSGlobalRequestsResponses

DBMS

UserInterface

QueryProcessor

QueryOptimizer

TransactionManager

Scheduler

RecoveryManager

Runtime Sup.Processor

USER

GTP GQP

GQOGS GRM

GUI

LocalRequests

Component Interface Processor(CIP)

DBMS

UserInterface

QueryProcessor

QueryOptimizer

TransactionManager

Scheduler

RecoveryManager

Runtime Sup.Processor

LocalRequests

Component Interface Processor(CIP)

Page 23: Outline - University of Winnipegion.uwinnipeg.ca/~ychen2/distributeDB/Architecture.pdf · 2004. 2. 20. · DBMS important one data model, query language,transaction management algorithms

Distributed DBMS Page 4. 23

Directory IssuesType

Location

Replication

Global & central& non-replicated

Local & central& non-replicated (?)

Global & distributed& non-replicated (?)

Local & distributed& non-replicated

Global & central& replicated (?)

Global & distributed& replicated

Local & distributed& replicated

Local & central& replicated (?)