Presentation is loading. Please wait.

Presentation is loading. Please wait.

Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:

Similar presentations


Presentation on theme: "Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:"— Presentation transcript:

1 Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:

2 OBJECTIVE Basic Transaction Concept Transaction as the basic unit of work in DBMS Transaction Types

3 TRANSACTION The concept of a transaction is used within the database domain as a basic unit of consistent and reliable computing A database in consistent state if it obey all of consistency (integrity) constraint defined over it Transaction consistency refers to the action of concurrent transaction. The module responsible for concurrency control in DBMS known as a scheduler, since its job is to schedule transactions correctly to avoid interference

4 Transaction Model Begin transaction T End transaction T Execution of transaction T DB in consistent state DB may temporarily in an inconsistent way during execution

5 Four basic properties of transaction Atomicity, the “all or nothing” property; a transaction is an indivisible unit Consistency, transaction transform the DB from one consistent state to another consistent state Independence, transaction execute independently of one another Durability, the effects of a successfully completed transaction are permanently recorded in the DB and can not be undone

6 Transaction in Application Program The execution of an application program in a database environment can be viewed as a series of atomic transaction with non- database process taking place in between

7 Transaction in Application Program Program Start Program End Time Transaction T1 Transaction T2 Transaction T3 Non-Database

8 Distributed Transaction Transaction may access data stored at more than one site Each transaction is divided into a number of sub-transactions

9 Distributed Transaction Example Begin transaction T1 Begin Transaction T1(A) read balance(x) balance(x) = balance(x) – 100 if balance(x) < - then print “No Fund” abort T1(A) end if write balance(x) commit T1(A)

10 Distributed Transaction Example Begin Transaction T1(B) read balance(y) balance(y) = balance(y) + 100 write balance(y) commit T1(B) Commit T1


Download ppt "Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:"

Similar presentations


Ads by Google