Presentation is loading. Please wait.

Presentation is loading. Please wait.

Transactional Information Systems - Chapter 2. ML Lab 나 용 찬

Similar presentations


Presentation on theme: "Transactional Information Systems - Chapter 2. ML Lab 나 용 찬"— Presentation transcript:

1 Transactional Information Systems - Chapter 2. ML Lab 나 용 찬
Computational Models Transactional Information Systems - Chapter 2. ML Lab 나 용 찬

2 Index Goal and Overview Ingredients The Page Model The Object Model
Road Map of the Book Lessons learned

3 Goal and Overview Theory of concurrency control and recovery are based on two models Page model Define the data objects as pages with read and write operations Object model Define the data objects as object with an encapsulated set of ADT operations

4 Ingredients Five-step program : For characterization of computational models Elementary operation Indivisible operation and it appears atomic and isolated from other operations Distinction between the page model & object model Transactions Can be modeled as sequences or partial orders of such operations Schedules or histories Several transactions are “shuffled” into a large collection of operations Abstract notion of concurrent executions Correct Identify correct in the sense of the ACID guarantees Algorithms or protocols Rules to create correct schedules in an online manner

5 The Page Model(1/4) Also known as the read/write model
Motivated from looking at the way data pages are accessed at the storage layer of a database system All higher-level operations on data Mapped into read & write operations on page Transaction Syntax : finite sequence of steps of the form r(x) or w(x) Semantics : interpretation of a transaction

6 The Page Model(2/4) pj=r(x) pj=w(x) Example
j-th step of a given transaction is read step Current value of x is assigned to a local variable vj: ⇒ vj:=x pj=w(x) j-th step of a given transaction is write step New value is written into x X:=fj(vj1,…,vjk) Example t=r(x)r(y)r(z)w(u)w(x) v1:=x, v2:=y, v3:=z Transaction : sequence

7 The Page Model(3/4) Definition : R ⊆ A X A partial order
(a, a) ∈ R reflexivity (a, b) ∈ R Λ (b, a) ∈ R ⇒ a = b antisymmetry (a, b) ∈ R Λ (b, c) ∈ R ⇒ (a, c) ∈ R transivity Definition : page model transaction A transaction t is a partial order of steps (actions) of the form r(x) or w(x), where x∈D and reads and writes as well as multiple writes applied to the same object are ordered t = (op, <) op : finite set of r(x) or w(x) < : op x op {p, q} ⊆ op : p & q both access the same data item and at least one of them is a write step (p<q Λ q<p)

8 The Page Model(4/4) Example Assumption t = r(x)w(x)r(y)r(x)w(x)
in each transaction each data item is read or written at most once no data item is read again after it has been written Not possibility of a blind write

9 The Object Model(1/4) More easily understood in the page model
Object Model is a sort of generalization of Page Model Provide a framework for representing method invocations on objects (Operations for short) : access layer ADT (abstract data type) instance Represents transaction as tree with the invoked operations as nodes Leaf nodes of transaction tree be elementary operations (read/write)

10 The Object Model(2/4) Definition : object model transaction
A transaction t is a (finite) tree of labeled nodes with the transaction identifier as the label of the root node the names and parameters of invoked operations as labels of inner (i.g.,nonleaf, nonroot) nodes page model read/write operations as labels of leaf nodes Along with partial order with before it is same Inner-node Ordering a<b if all leaf-node descendants of ‘a’ precede all leaf-node descendants of ‘b’

11 The Object Model(3/4) Example 1 : database system internal layers
(1) Retrieve all records from DB of persons who live in Austin (2) Insert new person who happen to live in Austin 1. Read the root of B+ tree at page r. 2. Read of leaf of B+ tree at page l. 3. Then Return RIDs or record x and y. 5. Read the metadata page(f) for find new page(p) with sufficient empty space 6. Read the page(p) and 7. write new record z 8. Add the RID for z to the B+ tree 4. Record(x,y) fetch at pages & respectively

12 The Object Model(4/4) Example 2 : business objects
(1) Withdraw money from one bank-account x (2) Deposit money in another bank-account y x, y  Bank accounts object h  History object (queue) for cash flow information , ŷ  Records on pages 1. Fetch record a on page s for head and tail of queue 2. Fetch most recent record d on page t 3. Add new record e on page t 4. Update the most recent record d on page t 5. Update (record a in page s) the head and tail of queue

13 Road Map of the Book Part II: Concurrency Control Part III: Recovery
Ch 3. Notion of Correctness for the Page Model Ch 4. Concurrency Control Algorithms Ch 5. Multi-version Concurrency Control Ch 6. Concurrency Control on Object Ch 7. Concurrency Control Algorithms on Objects Ch 8. Concurrency Control on Relational Database Ch 9. Concurrency Control on Search Structure Ch 10. Implementation and Pragmatic Issues Part III: Recovery Ch 11. Transaction Recovery Ch 12. Crash Recovery: Notion of Correctness Ch 13. Page Model Crash Recovery Algorithms Ch 14. Object Model Crash Recovery Ch 15. Special Issues of Recovery Ch 16. Media Recovery Ch 17. Application Recovery Part IV: Coordination of Distributed Transactions Ch 18. Distributed Concurrency Control Ch 19. Distributed Transaction Recovery

14 Definition of Data Object Representation of transaction
Lessons learned page model vs object model Nothing is as practical as a good theory Page Model Object Model Definition of Data Object Page with read / write operation Object with set of ADT operation Operation layer Storage Layer Access Layer Representation of transaction Sequence of Read/Write operation Tree with the invoked operations as nodes


Download ppt "Transactional Information Systems - Chapter 2. ML Lab 나 용 찬"

Similar presentations


Ads by Google