16
Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li http://isel.cs.pusan.ac.kr/~lik Pusan National University

Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

Embed Size (px)

Citation preview

Page 1: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

Massively Distributed Database Systems- Distributed DBS

Spring 2014Ki-Joune Li

http://isel.cs.pusan.ac.kr/~likPusan National University

Page 2: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

Pros and ConsReliability and Availability

Local Control

Incremental Growth

Communication Costs

Fast Response

Advantages

Software Cost and Complexity

Processing Overhead

Data Integrity

Slow Response

Disadvantages

Page 3: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

3-layer model of databases

External Layer

Conceptual Layer

Physical LayerData Storage Format

Conceptual Schema

View Definitions

Implementation- Systems

Modeling

Page 4: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

Local DatabaseLocal Database

Distributed Databases as a Logical Layers

External Layer

Conceptual Layer

Physical Layer

External Layer

Conceptual Layer

Physical Layer

External Layer

Conceptual Layer

Physical Layer

Global Conceptual Layer

Local Database

Global Physical Layer

GlobalDatabase

View from client View from client View from client

??

Page 5: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

Issues

• Replication vs. Partitioning• Distributed DBMS • Transparency• Query Optimization• Transaction Management

Page 6: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

Replication vs. Partitioning

• Replication• Partitioning• Vertical vs. Horizontal• Hybrid

Page 7: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

• Replicate all or parts of databases to local DB

Site 1

Replication

DB-1

DB-2

DB-3Site 2

DB-1

DB-2

Site 2

DB-2

DB-3

Page 8: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

How to manage replicated DBs?

• Issue 1 – Consistency • If updates at a site, how to manage the integrity of

global databases

• Issue 2 – How to duplicate• All or only some parts• Factors to consider

Page 9: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

Replication – Management of Consistency

• Snapshot replication• Store all update logs at a central site from a given time• Periodically send proper logs to local sites• Each local site reflects the update logs for its local DB

• Near Real-Time replication• When an update occurs, it triggers updates at other sites

• Pull Replication• Instead of push protocol, each local site asks update logs

when it is necessary

Page 10: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

Replication – Management of Consistency

• Exclusive ownership vs. Shared ownership• Single update vs. Multiple update

• Synchronous updates vs. Asynchronous update• Simple snapshot vs. Multiple snapshot

Page 11: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

Replication – How to replicate

• Fast Response• Communication Overhead• Security• Query Optimization

Page 12: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

Partitioning – Horizontal Partitioning

Split a table into sev-eral subtables

Page 13: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

Partitioning – Horizontal Partitioning

• How to split a table?• Efficiency• Local Optimization• Communication Overhead• Security

• Dynamic reconfiguration of Partitioning

Page 14: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

Partitioning – Vertical Partitioning

Split a DB into severaldisjoint tables

Shared Primary Keys – Join operations are inevitable

Page 15: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

Comparison btw Replication and Partitions

Page 16: Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li lik Pusan National University

Distributed DBMS

• What a distributed DBMS should do⁻ Management of Data Dictionary⁻ Resolving Heterogeneity: Schema, QL, DBMS⁻ Keeping distributed DBs secure and consistent: TM⁻ Transparency: single logical view to user⁻ Dynamic load balancing⁻ Query processing (Optimization)