Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data...
-
Upload
austin-quinn -
Category
Documents
-
view
216 -
download
2
description
Transcript of Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data...
![Page 1: Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:](https://reader036.fdocuments.us/reader036/viewer/2022082723/5a4d1ad77f8b9ab05997397a/html5/thumbnails/1.jpg)
Session – 11
CONCURRENCY CONTROL
USER ACCESS CONTROL
Matakuliah : M0184 / Pengolahan Data DistribusiTahun : 2005Versi :
![Page 2: Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:](https://reader036.fdocuments.us/reader036/viewer/2022082723/5a4d1ad77f8b9ab05997397a/html5/thumbnails/2.jpg)
OBJECTIVE
• Basic Transaction Concept• Transaction as the basic unit of work in
DBMS• Transaction Types
![Page 3: Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:](https://reader036.fdocuments.us/reader036/viewer/2022082723/5a4d1ad77f8b9ab05997397a/html5/thumbnails/3.jpg)
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
![Page 4: Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:](https://reader036.fdocuments.us/reader036/viewer/2022082723/5a4d1ad77f8b9ab05997397a/html5/thumbnails/4.jpg)
Transaction Model
Begin transaction T
End transaction TExecution of
transaction T
DB in consistent state
DB in consistent state
DB may temporarily in an inconsistent way during execution
![Page 5: Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:](https://reader036.fdocuments.us/reader036/viewer/2022082723/5a4d1ad77f8b9ab05997397a/html5/thumbnails/5.jpg)
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
![Page 6: Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:](https://reader036.fdocuments.us/reader036/viewer/2022082723/5a4d1ad77f8b9ab05997397a/html5/thumbnails/6.jpg)
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
![Page 7: Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:](https://reader036.fdocuments.us/reader036/viewer/2022082723/5a4d1ad77f8b9ab05997397a/html5/thumbnails/7.jpg)
Transaction in Application Program
ProgramStart
Program End
Time
TransactionT1
TransactionT2
TransactionT3
Non-Database
![Page 8: Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:](https://reader036.fdocuments.us/reader036/viewer/2022082723/5a4d1ad77f8b9ab05997397a/html5/thumbnails/8.jpg)
Distributed Transaction
• Transaction may access data stored at more than one site
• Each transaction is divided into a number of sub-transactions
![Page 9: Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:](https://reader036.fdocuments.us/reader036/viewer/2022082723/5a4d1ad77f8b9ab05997397a/html5/thumbnails/9.jpg)
Distributed Transaction Example
Begin transaction T1Begin Transaction T1(A)
read balance(x)balance(x) = balance(x) – 100if balance(x) < - then
print “No Fund”abort T1(A)
end ifwrite balance(x)
commit T1(A)
![Page 10: Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:](https://reader036.fdocuments.us/reader036/viewer/2022082723/5a4d1ad77f8b9ab05997397a/html5/thumbnails/10.jpg)
Distributed Transaction Example
Begin Transaction T1(B)read balance(y)balance(y) = balance(y) + 100write balance(y)
commit T1(B)Commit T1