Bài giảng Hệ quản trị cơ sở dữ liệu - Chương 12: Transaction management

Bài giảng Hệ quản trị cơ sở dữ liệu - Chương 12 giới thiệu về transaction management. Các nội dung được trình bày trong chương gồm có: Transactions, transaction ACID properties, concurrency in a DBMS, atomicity oftransactions,. . | Chương 12 Transaction Management 1 Transactions Concurrent execution of user programs is essential for good DBMS performance. Because disk accesses are frequent, and relatively slow, it is important to keep the cpu humming by working on several user programs concurrently. A user’s program may carry out many operations on the data retrieved from the database, but the DBMS is only concerned about what data is read/written from/to the database. A transaction is the DBMS’s abstract view of a user program: a sequence of reads and writes. 2 Transaction ACID Properties Atomic Either all actions are carried out or none are. Not worry about incomplete transaction. Consistency DBMS assumes that the consistency holds for each transaction. Isolation Transactions are isolated, or protected, from the effects of concurrently scheduling other transactions. Durability The effects of transaction is persist if DBMS informs the user successful execution 3 Concurrency in a DBMS Users submit | Chương 12 Transaction Management 1 Transactions Concurrent execution of user programs is essential for good DBMS performance. Because disk accesses are frequent, and relatively slow, it is important to keep the cpu humming by working on several user programs concurrently. A user’s program may carry out many operations on the data retrieved from the database, but the DBMS is only concerned about what data is read/written from/to the database. A transaction is the DBMS’s abstract view of a user program: a sequence of reads and writes. 2 Transaction ACID Properties Atomic Either all actions are carried out or none are. Not worry about incomplete transaction. Consistency DBMS assumes that the consistency holds for each transaction. Isolation Transactions are isolated, or protected, from the effects of concurrently scheduling other transactions. Durability The effects of transaction is persist if DBMS informs the user successful execution 3 Concurrency in a DBMS Users submit transactions, and can think of each transaction as executing by itself. Concurrency is achieved by the DBMS, which interleaves actions (reads/writes of DB objects) of various transactions. Each transaction must leave the database in a consistent state if the DB is consistent when the transaction begins. DBMS will enforce some ICs, depending on the ICs declared in CREATE TABLE statements. 4 Concurrency in a DBMS Beyond this, the DBMS does not really understand the semantics of the data. (., it does not understand how the interest on a bank account is computed). Issues: Effect of interleaving transactions, and crashes. 5 Atomicity of Transactions A transaction is seen by DBMS as a series or list of actions. Read/Write database object. A transaction might commit after completing all its actions. or it could abort (or be aborted by the DBMS) after executing some actions. 6 Atomicity of Transactions Transactions are atomic: a user can think of a transaction as always .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.