Serializability in Multidatabases Ramon Lawrence Dept. of Computer Science

Slides:



Advertisements
Similar presentations
Database Systems (資料庫系統)
Advertisements

More About Transaction Management Chapter 10. Contents Transactions that Read Uncommitted Data View Serializability Resolving Deadlocks Distributed Databases.
Concurrency Control WXES 2103 Database. Content Concurrency Problems Concurrency Control Concurrency Control Approaches.
Unit 9 Concurrency Control. 9-2 Wei-Pang Yang, Information Management, NDHU Content  9.1 Introduction  9.2 Locking Technique  9.3 Optimistic Concurrency.
Transaction Management: Concurrency Control CS634 Class 17, Apr 7, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
Principles of Transaction Management. Outline Transaction concepts & protocols Performance impact of concurrency control Performance tuning.
Concurrency Control Amol Deshpande CMSC424. Approach, Assumptions etc.. Approach  Guarantee conflict-serializability by allowing certain types of concurrency.
Lecture 11 Recoverability. 2 Serializability identifies schedules that maintain database consistency, assuming no transaction fails. Could also examine.
Page 1 Integrating Multiple Data Sources using a Standardized XML Dictionary Ramon Lawrence Integrating Multiple Data Sources using a Standardized XML.
Simulating MDBS Transaction Management Protocols TRLabs - Winnipeg Researchers: Ramon Lawrence, Aruna Adil, Ken Barker University of Manitoba Researchers:
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
CS 582 / CMPE 481 Distributed Systems Concurrency Control.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Transaction Management and Concurrency Control
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Transaction Management and Concurrency Control.
Session - 14 CONCURRENCY CONTROL CONCURRENCY TECHNIQUES Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Transaction Management
Page 1 Simulating MDBS Transaction Management Protocols Ramon Lawrence, Ken Barker, Aruna Adil Simulating MDBS Transaction Management Protocols Ramon Lawrence,
Page 1 MDBS Schema Integration: The Relational Integration Model Ramon Lawrence MDBS Schema Integration: The Relational Integration Model Candidacy Exam.
©Silberschatz, Korth and Sudarshan19.1Database System Concepts Lecture-10 Distributed Database System A distributed database system consists of loosely.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Transaction Management and Concurrency Control.
© 1998 Singh & Huhns1 Database Integration. © 1998 Singh & Huhns2 Dimensions of Integration Existence of global schema Location transparency: same view.
Distributed Databases
TRANSACTIONS AND CONCURRENCY CONTROL Sadhna Kumari.
UNIFOR University of Fortaleza Brazil University of Kaiserslautern Germany  Angelo Brayner CoopIS - Trento, September Global Semantic Serializability:
AN OPTIMISTIC CONCURRENCY CONTROL ALGORITHM FOR MOBILE AD-HOC NETWORK DATABASES Brendan Walker.
IMS 4212: Distributed Databases 1 Dr. Lawrence West, Management Dept., University of Central Florida Distributed Databases Business needs.
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.
Distributed DBMSSlide 1Lectured by, Jesmin Akhter, Assistant Professor, IIT, JU PMIT-6102 Advanced Database Systems By- Jesmin Akhter Assistant Professor,
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 10 Transaction Management.
TRANSACTIONS. Objectives Transaction Concept Transaction State Concurrent Executions Serializability Recoverability Implementation of Isolation Transaction.
Distributed Database Systems Overview
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Transactions CPSC 356 Database Ellen Walker Hiram College (Includes figures from Database Systems by Connolly & Begg, © Addison Wesley 2002)
Concurrency Server accesses data on behalf of client – series of operations is a transaction – transactions are atomic Several clients may invoke transactions.
1 Transactions Chapter Transactions A transaction is: a logical unit of work a sequence of steps to accomplish a single task Can have multiple.
1 Concurrency Control II: Locking and Isolation Levels.
Optimistic Methods for Concurrency Control By: H.T. Kung and John Robinson Presented by: Frederick Ramirez.
1 Multiversion Reconciliation for Mobile Databases Shirish Hemanath Phatak & B.R.Badrinath Presented By Presented By Md. Abdur Rahman Md. Abdur Rahman.
Transactions and Concurrency Control. Concurrent Accesses to an Object Multiple threads Atomic operations Thread communication Fairness.
Concurrency Control and Reliable Commit Protocol in Distributed Database Systems Jian Jia Chen 2002/05/09 Real-time and Embedded System Lab., CSIE, National.
Classification of Weak Correctness Criteria for Real-Time Database Applications Lee, Kyu-Woong and Park, Seog Sogang Univ., Seoul, Korea.
Topic Distributed DBMS Database Management Systems Fall 2012 Presented by: Osama Ben Omran.
Transaction Management Overview. Transactions Concurrent execution of user programs is essential for good DBMS performance. – Because disk accesses are.
1 Concurrency control lock-base protocols timestamp-based protocols validation-based protocols Ioan Despi.
Introduction to Distributed Databases Yiwei Wu. Introduction A distributed database is a database in which portions of the database are stored on multiple.
1 Advanced Database Concepts Transaction Management and Concurrency Control.
Timestamp-based Concurrency Control
Multidatabase Transaction Management COP5711. Multidatabase Transaction Management Outline Review - Transaction Processing Multidatabase Transaction Management.
SHUJAZ IBRAHIM CHAYLASY GNOPHANXAY FIT, KMUTNB JANUARY 05, 2010 Distributed Database Systems | Dr.Nawaporn Wisitpongphan | KMUTNB Based on article by :
Chapter 13 Managing Transactions and Concurrency Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
1 Chapter 22 Distributed DBMSs - Concepts and Design Simplified Transparencies © Pearson Education Limited 1995, 2005.
Transaction Management and Concurrency Control
Concurrency Control More !
Chapter 19: Distributed Databases
General Comments Information needed by Concurrency Controllers
Outline Introduction Background Distributed DBMS Architecture
Chapter 10 Transaction Management and Concurrency Control
Concurrency Control and Reliable Commit Protocol in Distributed Database Systems Jian Jia Chen 2002/05/09 Real-time and Embedded System Lab., CSIE, National.
Lecture 21: Concurrency & Locking
Concurrency Control WXES 2103 Database.
Outline Introduction Background Distributed DBMS Architecture
Database management concepts
Introduction of Week 13 Return assignment 11-1 and 3-1-5
Transaction management
Distributed Database Management Systems
Concurrency control (OCC and MVCC)
Outline Introduction Background Distributed DBMS Architecture
Transactions, Properties of Transactions
Presentation transcript:

Serializability in Multidatabases Ramon Lawrence Dept. of Computer Science

Outline l Introduction l Definitions of Serializability and MDBS l Background Work n strict-2PL algorithm, ticket algorithm, 2LSR l Problems with serializability l MDBS model not supporting serializability n updating independently updatable attributes l Future work and conclusions

MDBS Architecture

MDBS Architecture (cont.) l global transaction manager (GTM) breaks global transactions into subtransactions for the local databases l a global transaction server (GTS) converts the subtransactions for each local database system (LDBS) into a form usable by the LDBS l local transactions are allowed at each LDBS and are not controlled by the GTM

General Definitions l a global transaction involves data items at multiple sites l a local transaction involves data items at one site l a schedule is globally serializable there exists an ordering of committing global transactions such that all subtransactions of the global transactions are committed in the same order at all sites

Background Work l Transaction management in MDBS has proceeded in 3 general directions: n Weakening autonomy of local databases n Enforcing serializability by using local conflicts n relaxing serializability constraints by defining alternative notions of correctness

Weak LDBS Autonomy l if all LDBS control information is shared, problem is the same as a distributed-DB l many algorithms assume LDBS has certain properties l Breitbarts algorithm: n assumes each LDBS uses strict-2PL as concurrency control mechanism n serializability can be guaranteed by waiting to commit all subtransactions until all database operations are completed at all sites

Weak LDBS Autonomy (cont.) n This algorithm has several problems: –low concurrency –possibility of global deadlock –assumes each LDBS support prepare-to- commit state and strict-2PL –not fault tolerant during global commit n According to Breitbart, –if all the local DBMSs of a multidatabase system would use strict-2PL and 2PC then the problem of transaction management in a MDBS would be trivially solved…

Enforcing Serializability using Local Conflicts l an elegant algorithm was proposed by Georgakopoulos which used tickets at each LDBS to enforce global serializability l Algorithm: n each LDBS stores a ticket value n each subtransaction proceeds unobstructed but must take-a-ticket (increment ticket value) n when all subtransactions of a global transaction are in the prepare-to-commit state the execution is validated using a Global Serialization Graph (GSG)

Global Serialization Graph l nodes of GSG are recently committed transactions l an edge G i -> G j exists if at least one of the subtransactions of G i preceded (had a smaller ticket that) one of G j at any site l initially the GSG contains no cycles l add a node for the global transaction G to be committed and the appropriate edges l if a cycle exists abort G otherwise commit G

Optimistic Ticket Method (OTM) l This is called the Optimistic Ticket Method, and it guarantees serializability if each LDBS: n guarantees serializability n has a prepare-to-commit state l Drawbacks: n possible high rate of global transaction aborts n hot spot at ticket item n livelock is possible n Conservative Ticket Method has low concurrency

Quasi and Two-Level Serializability l both define a database to be consistent if it satisfies all database constraints (global/local) l quasi serializability forbids global transactions from accessing items with data dependencies spanning multiple sites l two-level serializability (2LSR) partitions the data items into local and global data n LDBSs serialize local data access n GTM serializes global data n local transactions cannot modify global data

Two-Level Serializability (cont.) l Advantages: n better concurrency due to separation of local and global data n probably best algorithm to implement in real-world l Drawbacks: n partitioning data into global/local may be difficult n global constraints may be violated unless forbid global transactions from accessing local data

The Problem with Serializability l no efficient algorithm to enforce serializability for the MDBS environment because of n communication costs/size of MDBS n LDBS autonomy - little cooperation l autonomous entities interact in parallel in a way that cannot be serialized l Real-world analogies: distributed database bee-hive MDBS group of people

A MDBS without Serializability l same architecture as before except: n a LDBS can reject a global update n unrestricted access to data items with low consistency requirements is allowed n reconciliation is done to make sites consistent n transaction semantics must be captured to make this reconciliation possible n global inconsistencies are allowed resulting in a change in the definition of a global transaction n each LDBS associates a trust factor for the other databases when deciding to commit updates

Defining the Global Schema l each DBA defines a global schema and the trustworthiness of other databases in the GTS l Algorithm: n export schema is entire LDBS schema n each attribute in export schema has two 32-bit bitmasks representing 32 levels of read/write access –a one in the k-bit indicates a transaction of priority k can access the attribute –the levels are not hierarchical

Defining the Global Schema (cont.) l Algorithm (cont.): n two special levels of access –Level 0 - unrestricted global access –Level 31 - no global access n each transaction is assigned a source LDBS n each GTS stores bitmasks representing access of a given LDBS, if a LDBS has access to the attributes in the transaction it is allowed to proceed l Method allows arbitrary federations to be defined on the same schema but is not secure

What is a Global Transaction? l in this environment, a transaction is a program consisting of: n a sequence of read/write operations n a commit or abort operation n a timestamp of submission and n a formulation of its execution sequence such that for every value written to the database there exists some function which determined the value l a global transaction queries an inconsistent global view looking for: n the most recent data value n the most common data value n the most trusted data value

Handling Independently Updatable Attributes l an independently updatable attribute is a stateless attribute that is not involved in any data dependencies n it can be modified without knowing its previous value or effecting other attributes in the system n examples: name, address, other vital statistics l the algorithm attempts to serialize transactions in timestamp order l no reconciliation is necessary as there are no data dependencies

Updating Algorithm l use the MDBS model defined previously l for local transactions: n execution is unchanged n on commitment extract write set(WS), timestamp of commitment, and local database identifier (LDI) l for global transactions: n timestamp, write set, and LDI must be determined l each data item has an associated timestamp managed by the GTS

Updating Algorithm (cont.) l for both local and global transactions: n the GTS of a LDBS participating in the update has the write set, timestamp, and LDI of the transaction n LDI is used to get transactions access priority n for each attribute x that the transaction has access to, the GTS performs: read(x) read(TS) if TS < transaction timestamp then write(x) n TS - timestamp of last update for x

Future Work l the MDBS model defined is very rough and needs to be defined more precisely l must be determined if a method of reconciliation is possible using current compiler/database technology l handling attributes with data dependencies is a critical issue

Conclusions l serializability is too restrictive in a MDBS environment as algorithms enforcing it have too low a degree of concurrency l an alternative method of looking at a MDBS based on a human model may be appropriate l unrestricted parallelism and reconciliation may be useful in a MDBS