Computational Models Database Lab. 120100213 Minji Jo.

Slides:



Advertisements
Similar presentations
What is Concurrent Process (CP)? Multiple users access databases and use computer systems Multiple users access databases and use computer systems simultaneously.
Advertisements

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.
Lock-Based Concurrency Control
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.
BTrees & Bitmap Indexes
©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.
System Catalogue v Stores data that describes each database v meta-data: – conceptual, logical, physical schema – mapping between schemata – info for query.
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)
Transaction Management: Concurrency Control CS634 Class 16, Apr 2, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
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.
Consider the program fragment below left. Assume that the program containing this fragment executes t1() and t2() on separate threads running on separate.
CIS 720 Distributed Shared Memory. Shared Memory Shared memory programs are easier to write Multiprocessor systems Message passing systems: - no physically.
Introduction.  Administration  Simple DBMS  CMPT 454 Topics John Edgar2.
1 Concurrency Control Lecture 22 Ramakrishnan - Chapter 19.
History & Motivations –RDBMS History & Motivations (cont’d) … … Concurrent Access Handling Failures Shared Data User.
Database Applications (15-415) DBMS Internals- Part III Lecture 13, March 06, 2016 Mohammad Hammoud.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.
Mohammed I DAABO COURSE CODE: CSC 355 COURSE TITLE: Data Structures.
Introduction to DBMS Purpose of Database Systems View of Data
Transactional Information Systems:
Contents. Goal and Overview. Ingredients. The Page Model.
Transactions.
Chapter 2 .Computational Models
On-Line Transaction Processing
Chapter 8: Concurrency Control on Relational Databases
Transaction Management
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
Database Management System
Chapter 1: Introduction
Transactional Information Systems:
Introduction What is a Database?.
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
Temple University – CIS Dept. CIS661 – Principles of Data Management
Ch 21: Transaction Processing
Chapter 14: Transactions
Concurrency Control WXES 2103 Database.
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
Introduction to DBMS Purpose of Database Systems View of Data
Distributed Shared Memory
Transactional Information Systems:
Query Processing CSD305 Advanced Databases.
Chapter 14: Transactions
Distributed Systems CS
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
Chapter 14: Transactions
Chapter 1: Introduction
EEC 688/788 Secure and Dependable Computing
C. Faloutsos Transactions
Temple University – CIS Dept. CIS616– Principles of Data Management
Transactional Information Systems:
Chapter 1: Introduction
Presentation transcript:

Computational Models Database Lab. 120100213 Minji Jo

contents Goal and Overview Ingredients The Page Model The Object Model Page Model vs. Object Model Road Map of the Book References

Goal and Overview Two computational model for transactional server Page model ( = read / write model ) 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 Clients Server Requests Language & Interface Layer 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. Database Server Clients . . . Requests Language & Interface Layer Query Decomposition & Optimization Layer Query Execution Layer Access Layer Storage Layer Data Accesses Request Execution Threads Page Model Object Model Page Model : Storage Layer. Object Model : Access Layer + Query Execution Layer.

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.

Page Model Read/Write Model Motivated from looking at the way data page are accessed at the storage layer of database system. All higher-level operations on data are mapped into read/write operation on pages. Each page read/write is assumed to be an indivisible operation. Regardless of whether it takes place in a page cache in memory or on disk. 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.

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)

Page Model Semantic : interpretation of transaction steps  : current value of x is assigned to a local variable v j  : x is the return value of function f j ex)

Page Model DEF 2.1 Partial Order DEF 2.2 Page Model Transaction 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 ( reflexivity ) 2. (a, b) ∈ R ∧ (b, a) ∈ R => a = b (antisymmetry) 3. (a, b) ∈ R ∧ (b, c) ∈ R => (a, c) ∈ R (transitivity) Total order R of A : partial order that has additional requirement (a, b ∈ A, (a, b) ∈ R or (b,a) ∈ R) DEF 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 object are ordered We wrote t = (op, <) For transaction t with step set op and partial order <.

Page Model In the partial ordering of transaction’s step, we disallow that a read/write operation on the same data item, or two write operation on the same data item, are unordered. Ensure unambiguous interpretation Allows a transaction to read or write the same data item more than once 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. Assumption In each transaction each data item is read or written at most once. No data item is read(again) after it has been written.

Object Model Generalization of page model Page model is implicitly included object 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’.

Object Model Database system internal layers Retrieve all record from a database of person who live in Austin 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

Object Model Business object Withdraws money from one bank account x Deposits money in another account y 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 x, y  Bank accounts object h  History object (queue) for cash flow information x, y  Records on pages ^ ^

Object Model DEF 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 node, along with a partial order “<“ on the leaf node such that for all leaf node operations p and q of the for 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 Tree with the invoked operations as nodes

Road Map of the Book 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