Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2 .Computational Models

Similar presentations


Presentation on theme: "Chapter 2 .Computational Models"— Presentation transcript:

1 Chapter 2 .Computational Models
Ha,Hong Pyo

2 Outline Paper information Introduction What is model?
Transaction Model Conclusion

3 Introduction Modeling in transaction in database

4 What is model? Definition That is descriptive statements for object
expressed in a given language

5 PURPOSE OF MODEL SPECIFYING IMPLEMENTATION MODEL ABSTRACTION

6 Origin meaning of model
The term “model” is derived from the Latin word modulus, which means measure, rule, pattern, example to be followed. Obvious examples are toy railways and dolls, maps, architectural models of buildings. In software engineering, we have process models, design patterns, class diagrams. Other models are less obvious, like project plans, specifications and designs, metrics, and minutes of project meetings.

7 How is a model used? FROM SUS DUDUCTION NEW STATEMENTS

8 What is a transaction? Definition of a transaction from user viewpoint
The execution of a program to perform a function (functions) by accessi ng a shared database, usually on behalf of a user (application) You have a requirement (air ticket booking) -> Your system implements a function to meet your requirement -> You invoke the function to book an air ticket -> a transaction is created Other Examples: Reserve a room in a hotel Withdraw money from an ATM Verify a credit card sale Update a student record Place an order using an on-line catalog on the Internet

9 SIMPLE MODEL OF A DATABASE
A database - collection of named data items Granularity of data - a field, a record , or a whole disk block (Concepts are independent of granularity) Basic operations are read and write read_item(X): Reads a database item named X into a program variable. To simplify our notation, we assume that the program variable is also named X. write_item(X): Writes the value of program variable X into the database item named X.

10 Computational Models for transactional server
Defining elementary options on objects Execution of transaction programs can be modeled Obtaining schedules or histories as an abstract notion of concurrent execution Identifying ACID properties Creating correct algorithm and protocols

11 partial order’s Formal definition
A partial order is a binary relation "≤" over a set P which is reflexive, antisymmetric, and transitive, i.e., for all a, b, and c in P, we have that: a ≤ a (reflexivity); if a ≤ b and b ≤ a then a = b (antisymmetry); if a ≤ b and b ≤ c then a ≤ c (transitivity).

12 Differences between Object model and page model
Elementary options What kind of elementary operation ,we consider lead to the distinction page model and the object the model Page model : these are pages with read and write operation Object model : these are general objects with an encapsulated set of operations appllicable to them

13 Backup/Recovery Manager
Read/write model We abstract from transaction semantics except for database reads and writes. Basic operations in the model? Basic operations must be guaranteed to be formal consistent, atomic and isolated. Transaction 1 Transaction 2 ... Transaction n Scheduler restart restore Backup/Recovery Manager Database Manager Archive Manager Database We are only concerned with database consistency  we are only interested in database reads and writes.

14 Read/write model “Syntax”: (Read/Write Model Transaction):
A transaction t is a partial order of steps (actions) of the form r(x) or w(x), where x  D (D database) and reads and writes applied to the same object are strictly ordered. We write t = (op, <) for transaction t with step set op and partial order <. Examples: t1 = r(s)w(s)r(v)w(v) for short: r(s) w(s) r(v) w(v) t2 = r(s)w(s) r(v)w(v)

15 Read/write model Worst-case assumption! “Syntax”:
(Read/Write Model Transaction): A transaction t is a partial order of steps (actions) of the form r(x) or w(x), where x  D (D database) and reads and writes applied to the same object are strictly ordered. We write t = (op, <) for transaction t with step set op and partial order <. “Semantics”: Interpretation of jth step, pj, of t: If pj=r(x), then interpretation is assignment vj := x to local variable vj If pj=w(x) then interpretation is assignment x := fj (vj1, ..., vjk). with unknown function fj and j1, ..., jk denoting t‘s prior read steps. Worst-case assumption!

16 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 pair t = ( op, < ) The page model as described above allows a transaction to read or write the same data item more than once, as it the case in the example t = r(x)w(x)r(y)r(x)w(x)

17 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 Page model read/write operations as labe니 of leaf nodes

18 Database system internal layers
Person who lives in Austin Inspecting result SQL Command translated into operation at the query processing layer at compile time Search operation on an index that returns the RID(address)

19 DISCUSSION , Q & A Session.
Does anybody have a question ?


Download ppt "Chapter 2 .Computational Models"

Similar presentations


Ads by Google