Transaction
Transaction
Contents
Introduction
Transaction Properties of a transaction
Transaction states
NGUYEN HongPhuong Processing a transaction
Email: [email protected]
Transactions, read and write
Site: http://users.hust.edu.vn/phuongnh
Face: https://www.facebook.com/phuongnhbk operation, DBMS buffer
Hanoi University of Science and Technology Some examples
Transaction best practices
1 2
3 4
1
02/12/2019
7 8
2
02/12/2019
3
02/12/2019
15 16
4
02/12/2019
19 20
5
02/12/2019
Problem
The Lost Update
T1 T2 The Temporary Update (Dirty Read)
read_item (X); read_item (X);
X:=X-N; X:=X+M;
The Incorrect Summary
write_item (X); write_item (X); The Unrepeatable Read
read_item (Y);
Y:=Y+N;
write_item (Y);
21 22
6
02/12/2019
27 28
7
02/12/2019
29 30
31 32
8
02/12/2019
33