Distributed Database Management Systems: Lecture 27. The main topics covered in this chapter include: ACID properties; types of transaction; transaction in DDBS; isolation and consistency are interrelated, one supports other; degree 3 provides full isolation;...
Distributed Database Management Systems Lecture 27 In the previous lecture • Defined Transaction Formally • ACID Properties of a Transaction In this Lecture • ACID Properties • Types of Transaction • Transaction in DDBS • Isolation and consistency are interrelated, one supports other • Degree provides full isolation • SQL-92 identified isolation levels based on following phenomena –Dirty Read: A transaction reads the written value of another transaction before its commitment, like, , W1(x), , R2(x), ,C1(or A1) -, C2(or A2) –Non-repeatable or Fuzzy Read: Two reads of same data item by same Tr and a write by another Tr on the same data item , R1(x), , W2(x), ,C2 -, R1(x) Phantom: T1 performs a read on a predicate, T2 inserts tuples that satisfy the predicate , R1(P), , W2(yinP), - ,C2(orA2) -, C1(orA1) - • Isolation levels –Read Uncommitted: all three phenomena possible –Read Committed: fuzzy read, phantoms possible; DR not possible –Repeatable Read: Only phantoms possible –Anomaly Serializable: None of the phenomena possible 4- Durability: • Once committed, changes to DB are permanent Types of Transactions Begin Transaction, Read Write, Commit, Abort Results Distributed Execution Monitor With other SCs With other TMs Transaction Manager Coordinates transactions exec Scheduler Sched/DeSched requests With other Data processors That concludes our basic discussion on Transactions Distributed Concurrency Control Chapter 11 CC concerns synchronizing concurrent transactions maintaining consistency of the database and maximizing degree of concurrency Schedule or History An order in which the operations of a set of transactions are executed A schedule (history) can be defined as a partial order over the operations of a set of transactions T1: Read(x) Write(x) Commit T2: Write(x) Write(y) Read(z) Commit T3: Read(x) Read(y) Read(z) Commit S={W 2 (x),R 1 (x), R 3 (x),W 1 (x),C 1 ,W2(y), R 3 (y),R 2 (z),C 2 ,R 3 (z),C 3 } Complete Schedule • A complete schedule S over a set of transactions T={T1, …, Tn} is a partial order C S • T( T,