Professional Documents
Culture Documents
08-Quan Ly Giao Dich
08-Quan Ly Giao Dich
a given customer.
2. Insert new sales order items into
the orderdetails table
Tính chất của 1 giao dịch
Để thỏa mãn tính chất là một giao dịch, cần có các tính
chất ACID (Atomic, Consistent, Isolated, Durable)
http://en.wikipedia.org/wiki/ACID
Thao tác giao dịch cơ bản trong MySQL
START TRANSACTION tạo một giao dịch
COMMIT, ROLLBACK để kết thúc giao dịch.
Lệnh COMMIT lưu các thay đổi vào CSDL
nhật bảng đó
Giao dịch A đọc lại bảng
http://en.wikipedia.org/wiki/Multiversion_concurrency_control
Tài liệu tham khảo
http://www.mysql.com
http://dev.mysql.com/doc/refman/5.5/en/
http://www.w3resource.com/mysql/mysql-
transaction.php