Manajemen Basis Data Pertemuan 10 Matakuliah: M0264/Manajemen Basis Data Tahun: 2008.

Slides:



Advertisements
Similar presentations
Types of Distributed Database Systems
Advertisements

Manajemen Basis Data Pertemuan 12 Matakuliah: M0264/Manajemen Basis Data Tahun: 2008.
More About Transaction Management Chapter 10. Contents Transactions that Read Uncommitted Data View Serializability Resolving Deadlocks Distributed Databases.
1 Concurrency Control Chapter Conflict Serializable Schedules  Two actions are in conflict if  they operate on the same DB item,  they belong.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Lectures 25-26: Distributed Coordination (Ch 18)
Chapter 18: Distributed Coordination Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 18 Distributed Coordination Event Ordering.
Lecture 11 Recoverability. 2 Serializability identifies schedules that maintain database consistency, assuming no transaction fails. Could also examine.
Distributed Databases John Ortiz. Lecture 24Distributed Databases2  Distributed Database (DDB) is a collection of interrelated databases interconnected.
Distributed databases
Database Systems, 8 th Edition Concurrency Control with Time Stamping Methods Assigns global unique time stamp to each transaction Produces explicit.
Exercises for Chapter 17: Distributed Transactions
CIS 720 Concurrency Control. Timestamp-based concurrency control Assign a timestamp ts(T) to each transaction T. Each data item x has two timestamps:
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Chapter 13 (Web): Distributed Databases
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 17 Distributed Coordination Event Ordering Mutual Exclusion Atomicity Concurrency.
Distributed Locking. Distributed Locking (No Replication) Assumptions Lock tables are managed by individual sites. The component of a transaction at a.
Manajemen Basis Data Pertemuan 9 Matakuliah: M0264/Manajemen Basis Data Tahun: 2008.
What we will cover…  Distributed Coordination 1-1.
Database Replication techniques: a Three Parameter Classification Authors : Database Replication techniques: a Three Parameter Classification Authors :
1 Minggu 12, Pertemuan 23 Introduction to Distributed DBMS (Chapter , 22.6, 3rd ed.) Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
CS 582 / CMPE 481 Distributed Systems
1 ICS 214B: Transaction Processing and Distributed Data Management Replication Techniques.
Manajemen Basis Data Pertemuan 4 Matakuliah: M0264/Manajemen Basis Data Tahun: 2008.
Session - 14 CONCURRENCY CONTROL CONCURRENCY TECHNIQUES Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Overview Distributed vs. decentralized Why distributed databases
Session - 18 RECOVERY CONTROL - 2 Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Session - 13 CONCURRENCY CONTROL CONCURRENCY TECHNIQUE Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Distributed Databases
Transaction Management
Chapter 18.2: Distributed Coordination Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 18 Distributed Coordination Chapter.
Chapter 18: Distributed Coordination (Chapter 18.1 – 18.5)
©Silberschatz, Korth and Sudarshan19.1Database System Concepts Distributed Transactions Transaction may access data at several sites. Each site has a local.
Definition of terms Definition of terms Explain business conditions driving distributed databases Explain business conditions driving distributed databases.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Transaction Management and Concurrency Control.
CS 603 Data Replication February 25, Data Replication: Why? Fault Tolerance –Hot backup –Catastrophic failure Performance –Parallelism –Decreased.
Chapter 23 Distributed DBMSs - Advanced Concepts Transparencies © Pearson Education Limited 1995, 2005.
Distributed Databases
TRANSACTIONS AND CONCURRENCY CONTROL Sadhna Kumari.
Concurrency Control in Distributed Databases. By :- Rishikesh Mandvikar rmandvik[at]engr.smu.edu May 1, 2004.
III. Current Trends: 2 - Distributed DBMSsSlide 1/47 III. Current Trends Distributed DBMSs: Advanced Concepts 3C13/D63C13/D6.
04/18/2005Yan Huang - CSCI5330 Database Implementation – Distributed Database Systems Distributed Database Systems.
DISTRIBUTED DATABASE SYSTEM.  A distributed database system consists of loosely coupled sites that share no physical component  Database systems that.
Replication March 16, Replication What is Replication?  A technique for increasing availability, fault tolerance and sometimes, performance 
Distributed Transactions
Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using.
DISTRIBUTED COMPUTING
Operating Systems Distributed Coordination. Topics –Event Ordering –Mutual Exclusion –Atomicity –Concurrency Control Topics –Event Ordering –Mutual Exclusion.
O/S 4740 Distributed Coordination. Event Ordering In a Centralized system, we have common memory and clock, –So we can always determine the order that.
Session - 17 RECOVERY CONTROL - 2 Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
SYNCHRONIZATION TECHNIQUES BASED ON TWO-PHASE LOCKING
Databases Illuminated
Distributed Transaction Management. Outline Introduction Concurrency Control Protocols  Locking  Timestamping Deadlock Handling Replication.
Page 1 Concurrency Control Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Transaction Management Transparencies. ©Pearson Education 2009 Chapter 14 - Objectives Function and importance of transactions. Properties of transactions.
Introduction to Distributed Databases Yiwei Wu. Introduction A distributed database is a database in which portions of the database are stored on multiple.
Topics in Distributed Databases Database System Implementation CSE 507 Some slides adapted from Navathe et. Al and Silberchatz et. Al.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 22: Distributed.
Silberschatz and Galvin  Operating System Concepts Module 18: Distributed Coordination Event Ordering Mutual Exclusion Atomicity Concurrency.
Distributed Databases – Advanced Concepts Chapter 25 in Textbook.
Lecture 17- Distributed Databases (continued)
6.4 Data and File Replication
Distributed Transactions
RELIABILITY.
Outline Announcements Fault Tolerance.
CSIS 7102 Spring 2004 Lecture 6: Distributed databases
Chapter 10 Transaction Management and Concurrency Control
Distributed Database Management Systems
Distributed Databases Recovery
CIS 720 Concurrency Control.
Transactions, Properties of Transactions
Presentation transcript:

Manajemen Basis Data Pertemuan 10 Matakuliah: M0264/Manajemen Basis Data Tahun: 2008

Bina Nusantara Distributed Concurency Control Distributed Database Recovery Objectives

Bina Nusantara Distributed Serializability Locking Protocols –Centralized 2PL –Primary copy 2PL –Distributed 2PL –Majority Locking Timestamp Protocols Distributed Concurency Control

Bina Nusantara Distributed Concurency Control Centralized Locking –Single site that maintains all locking information. –One lock manager for whole of DDBMS. –Local transaction managers involved in global transaction request and release locks from lock manager. –Or transaction coordinator can make all locking requests on behalf of local transaction managers. –Advantage - easy to implement. –Disadvantages - bottlenecks and lower reliability.

Bina Nusantara Distributed Concurency Control Primary Copy 2PL –Lock managers distributed to a number of sites. –Each lock manager responsible for managing locks for set of data items. –For replicated data item, one copy is chosen as primary copy, others are slave copies –Only need to write-lock primary copy of data item that is to be updated. –Once primary copy has been updated, change can be propagated to slaves.

Bina Nusantara Distributed Concurency Control Distributed 2PL –Lock managers distributed to every site. –Each lock manager responsible for locks for data at that site. –If data not replicated, equivalent to primary copy 2PL. –Otherwise, implements a Read-One-Write-All (ROWA) replica control protocol.

Bina Nusantara Distributed Concurency Control Majority Locking –Extension of distributed 2PL. –To read or write data item replicated at n sites, sends a lock request to more than half the n sites where item is stored. –Transaction cannot proceed until majority of locks obtained. –Overly strong in case of read locks.

Bina Nusantara Distributed Concurency Control Distributed Timestamping –Objective is to order transactions globally so older transactions (smaller timestamps) get priority in event of conflict. –In distributed environment, need to generate unique timestamps both locally and globally. –System clock or incremental event counter at each site is unsuitable. –Concatenate local timestamp with a unique site identifier:.

Bina Nusantara Distributed Concurency Control Distributed Timestamping –Objective is to order transactions globally so older transactions (smaller timestamps) get priority in event of conflict. –In distributed environment, need to generate unique timestamps both locally and globally. –System clock or incremental event counter at each site is unsuitable. –Concatenate local timestamp with a unique site identifier:.

Bina Nusantara Distributed Timestamping Site identifier placed in least significant position to ensure events ordered according to their occurrence as opposed to their location. To prevent a busy site generating larger timestamps than slower sites: –Each site includes their timestamps in messages. –Site compares its timestamp with timestamp in message and, if its timestamp is smaller, sets it to some value greater than message timestamp.

Bina Nusantara Distributed Database Recovery DDBMS is highly dependent on ability of all sites to be able to communicate reliably with one another. Communication failures can result in network becoming split into two or more partitions. May be difficult to distinguish whether communication link or site has failed.

Bina Nusantara Distributed Database Recovery Failure in Distributed Environment How Failures Affect Recovery Two-Phase Commit (2PC) Three-Phase Commit (3PC) Network Partitioning

Bina Nusantara Distributed Database Recovery State Transition Diagram for 2PC

Bina Nusantara Distributed Database Recovery State Transition Diagram for 3PC

Bina Nusantara Distributed Database Recovery Network Partitioning –If data is not replicated, can allow transaction to proceed if it does not require any data from site outside partition in which it is initiated. –Otherwise, transaction must wait until sites it needs access to are available. –If data is replicated, procedure is much more complicated.