Contents. Goal and Overview. Ingredients. The Page Model.

Slides:



Advertisements
Similar presentations
Transaction Management: Concurrency Control CS634 Class 17, Apr 7, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
Advertisements

Principles of Transaction Management. Outline Transaction concepts & protocols Performance impact of concurrency control Performance tuning.
Advanced Database Discussion B Trees. Motivation for B-Trees So far we have assumed that we can store an entire data structure in main memory What if.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
Universität Karlsruhe (TH) © 2006 Univ,Karlsruhe, IPD, Prof. Lockemann/Prof. BöhmTAV 2 Chapter 2 Model for transactions.
Dr. Kalpakis CMSC 461, Database Management Systems Introduction.
C o n f i d e n t i a l Developed By Nitendra NextHome Subject Name: Data Structure Using C Title: Overview of Data Structure.
INTRODUCTION TO TRANSACTION PROCESSING CHAPTER 21 (6/E) CHAPTER 17 (5/E)
Introduction to Databases
Transaction Management: Concurrency Control CS634 Class 16, Apr 2, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
RELATIONAL FAULT TOLERANT INTERFACE TO HETEROGENEOUS DISTRIBUTED DATABASES Prof. Osama Abulnaja Afraa Khalifah
Chapter 1 : Introduction §Purpose of Database Systems §View of Data §Data Models §Data Definition Language §Data Manipulation Language §Transaction Management.
Chapter 11 Heap. Overview ● The heap is a special type of binary tree. ● It may be used either as a priority queue or as a tool for sorting.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
Introduction to Database Systems1. 2 Basic Definitions Mini-world Some part of the real world about which data is stored in a database. Data Known facts.
Introduction.  Administration  Simple DBMS  CMPT 454 Topics John Edgar2.
1 Concurrency Control Lecture 22 Ramakrishnan - Chapter 19.
Mr.Prasad Sawant, MIT Pune India Introduction to DBMS.
History & Motivations –RDBMS History & Motivations (cont’d) … … Concurrent Access Handling Failures Shared Data User.
1 Controlled concurrency Now we start looking at what kind of concurrency we should allow We first look at uncontrolled concurrency and see what happens.
6/18/2016Transactional Information Systems3-1 Part II: Concurrency Control 3 Concurrency Control: Notions of Correctness for the Page Model 4 Concurrency.
Database Applications (15-415) DBMS Internals- Part III Lecture 13, March 06, 2016 Mohammad Hammoud.
Mohammed I DAABO COURSE CODE: CSC 355 COURSE TITLE: Data Structures.
CPSC-310 Database Systems
Introduction to DBMS Purpose of Database Systems View of Data
Transactional Information Systems:
Transactions.
Chapter 2 .Computational Models
Chapter 8: Concurrency Control on Relational Databases
Indexing Structures for Files and Physical Database Design
Chapter 1: Introduction
Chapter 1: Introduction
Transactional Information Systems - Chapter 2. ML Lab 나 용 찬
Multiway Search Trees Data may not fit into main memory
Azita Keshmiri CS 157B Ch 12 indexing and hashing
6. Concurrency Control on Objects : Notions of Correctness.
Computational Models Database Lab Minji Jo.
CE 221 Data Structures and Algorithms
Chapter 1: Introduction
Chap 1. What is it all About ??
Transactional Information Systems:
Chapter 6: Concurrency Control on Objects: Notions of Correctness
Map interface Empty() - return true if the map is empty; else return false Size() - return the number of elements in the map Find(key) - if there is an.
Database Applications (15-415) DBMS Internals- Part III Lecture 15, March 11, 2018 Mohammad Hammoud.
Introduction to Database Systems
March 21st – Transactions
Ch 21: Transaction Processing
Outline Introduction Background Distributed DBMS Architecture
EEC 688/788 Secure and Dependable Computing
Cs212: Data Structures Computer Science Department Lecture 7: Queues.
EEC 688/788 Secure and Dependable Computing
Introduction to DBMS Purpose of Database Systems View of Data
Transactional Information Systems:
Database management concepts
Relational Database Design
Introduction to Data Structure
Chapter 2: Computational Models
Evaluation of Relational Operations: Other Techniques
Transaction Management
Chapter 1: Introduction
Chapter 1: Introduction
Temple University – CIS Dept. CIS661 – Principles of Data Management
Transactional Information Systems:
Chapter 1: Introduction
EEC 688/788 Secure and Dependable Computing
Transactional Information Systems:
Chapter 1: Introduction
UNIT -IV Transaction.
Outline Introduction Background Distributed DBMS Architecture
Presentation transcript:

Chap 2. Computational Models. Transactional Information Systems. Chap 2. Computational Models. 2007. 04. 04 (Thu) Database Lab. Kim Jinyoung

Contents. Goal and Overview. Ingredients. The Page Model. 1 Ingredients. 2 The Page Model. 3 The Object Model. 4 Road Map of the Book. 5 Lessons Learned. 6 References. 7

Goal and Overview. For Concurrency control & Recovery Two Computational Models for transactional servers. Page Model ( = read / write model ) - nicely motivated from looking at the way data pages are accessed at the storage layer of database system. - Define the data objects as pages with read and write operations. Object Model ( richer than page model ) - Define the data objects as object with an encapsulated set of ADT operations.

Goal and Overview. Two Computational Models for transactional servers. Language & Interface Layer : - client-server communication, Initial processing steps for request, checking authentication and authorization. Query Decomposition & Optimization Layer : - the request into smaller units that can be directly executed. Query Execution Layer : - provides codes for operators and control, data flow among operators. Access Layer : - Both data records and index structures are ultimately mapped onto pages. Storage Layer : - responsible for managing the pages of a database. Goal and Overview. Two Computational Models for transactional servers. Layered architecture of a database sustem Clients Requests Language & Interface Layer Query Decomposition & Optimization Layer Request Execution Threads Query Execution Layer Object Model Access Layer Database Server Storage Layer Page Model Data accesses Page Model : Storage Layer. Object Model : Access Layer + Query Execution Layer. Database

Ingredients. Five-step program for characterization of computational models. Elementary operations on data objects are defined. - individual operation and it appears atomic and isolated from other operations. - Distinction between the page model & object model. Transactions as executions of transaction programs. - Sequences or partial orders of such operations. Schedules or Histories as abstract notion of concurrent executions. - Several transactions are shuffled into a large collection of operations. Correct - Identify correct schedules in the sense of the ACID guarantees. Algorithms or Protocols to create correct Schedules. - Rules to create correct Schedules in an online manner.

The Page Model. has the essence of concurrency control and recovery problem. a comprehensive theory of concurrency control and of recovery can be built on Page Model. All higher-level operations on data are eventually mapped into read / write operations on pages. each page read or write is an indivisible operation. Limitation : no semantics of the data access operations. (given the simple low-level nature of page reads and writes.)  This is exactly why we later need the richer object model.

The Page Model. ( finite ) set D = { x, y, z, … } : data server’s data items as pages. Syntax : totally ordered transaction. (finite) sequence of steps of the form r(x) or w(x). : j-th step of the transaction. : j-th step of the transaction i. : step j reads data item x. : step j writes data item x. ex)

The Page Model. Semantics : interpretation of a transaction.  : current value of x is assigned to a local variable v j  : x is the return value of function f j All values , , that were read prior to the j-th step of t are used as parameters in function ex)

The Page Model. DEFINITION 2.1 Partial Order Let A be an arbitrary set. A relation R⊆A X A is a partial order on A if the following conditions hold for all elements a, b, c ∈ A : 1. (a, a) ∈ R 2. (a, b) ∈ R ∧ (b, a) ∈ R  a = b 3. (a, b) ∈ R ∧ (b, c) ∈ R  (a, c) ∈ R ( reflexivity ) ( antisymmetry ) ( transitivity ) A Total order R of A : Partial Order Definition + Any two distinct a, b ∈ A, either (a, b) ∈ R or (b, a) ∈ R. (a, b) ∈ R : a b

The Page Model. DEFINITION 2.2 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 data item are ordered. More formally, a transaction is a pair t = ( op, < ) where op is a finite set of steps of the form r(x) or w(x), x∈D, and < ⊆ op X op is a partial order on set op for which the following holds : if {p,q} ⊆ op such that p and q both access the same data item and at least one of them is a write step, then p < q ∨ q < p.

The Page Model. In the partial ordering, we disallow that a read and write operation on the same data item, or two write operations on the same data items, are unordered.  ensure an unambiguous interpretation. ex) , t = r(x) w(x) r(y) r(x) w(x) last write step determines the final value of x produced by this transaction. Assumptions : in each transaction each data item is read or written at most once, no data item is read (again) after it has been written.

The Object Model. explicitly separate this model from the page model.  alternative to or generalization of the page model. provides framework for representing method invocations on objects. Represents transaction as tree with the invoked operations as nodes. Leaf nodes of transaction tree be elementary operations. (read / write) Layered Transaction ( = Multilevel Transaction ) : All leaf-nodes have same distance form root. (special case) Inner-node Ordering : a < b if all leaf-node descendants of ‘a’ precede all leaf-node descendants of ‘b’.

The Object Model. Example 1. : Database system layers. Select Name, City, Zipcode, Street From Person Where Age < 30 And City = “Austin” The Object Model. Example 1. : Database system layers. (1) Retrieve all records from Database of persons who live in Austin. (2) Insert a record for a new person who happens 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 of record x and y. transactions 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 each pages & respectively

The Object Model. Example 2. : Business Objects. 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 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 x, y  Records on pages ^ ^

The Object Model. DEFINITION 2.3 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.e., nonleaf, nonroot) nodes, page model read / write operations as labels of leaf nodes, Along with a partial order “<“ on the leaf nodes such that for all leaf node operations p and q with p of the form w(x) and q of the form r(x) or w(x) or vice versa, we have p < q ∨ q < p.

Page Model vs Object Model. Definition of Data Object Page with read / write operation Object with set of ADT operation Operation Layer Storage Layer Access Layer & Query Execution Layer Representation of transaction Sequence of read / write operation Tree with the invoked operations as nodes

Road Map of the Book. Part III: Recovery Part II: Concurrency Control 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

References. G.Weikum and G.Vossen, “Transactional Information Systems: Theory, Algorithms, and the Practice of Concurrency Control and Recovery,” Morgan Kaufmann, 2002

Thank You !