Lecture Database system concepts (6/e): Chapter 14 - Silberschatz, Korth, Sudarshan

Chapter 14 - Transactions. This chapter focuses on the fundamentals of a transaction-processing system: atomicity, consistency, isolation, and durability. It provides an overview of the methods used to ensure these properties, including locking and snapshot isolation. | Chapter 14: Transactions Database System Concepts, 6th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-use Chapter 14: Transactions Transaction Concept Transaction State Concurrent Executions Serializability Recoverability Implementation of Isolation Transaction Definition in SQL Testing for Serializability. Database System Concepts - 6th Edition ©Silberschatz, Korth and Sudarshan Transaction Concept A transaction is a unit of program execution that accesses and possibly updates various data items. . transaction to transfer $50 from account A to account B: 1. read(A) 2. A := A – 50 3. write(A) 4. read(B) 5. B := B + 50 6. write(B) Two main issues to deal with: Failures of various kinds, such as hardware failures and system crashes Concurrent execution of multiple transactions Database System Concepts - 6th Edition ©Silberschatz, Korth and Sudarshan Example of Fund Transfer Transaction to transfer $50 from account A to account B: 1. read(A) 2. A := A – 50 3. write(A) 4. read(B) 5. B := B + 50 6. write(B) Atomicity requirement if the transaction fails after step 3 and before step 6, money will be “lost” leading to an inconsistent database state Failure could be due to software or hardware the system should ensure that updates of a partially executed transaction are not reflected in the database Durability requirement — once the user has been notified that the transaction has completed (., the transfer of the $50 has taken place), the updates to the database by the transaction must persist even if there are software or hardware failures. Database System Concepts - 6th Edition ©Silberschatz, Korth and Sudarshan Example of Fund Transfer (Cont.) Transaction to transfer $50 from account A to account B: 1. 2. 3. 4. 5. 6. read(A) A := A – 50 write(A) read(B) B := B + 50 write(B) Consistency requirement in above example: the sum of A and B is

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
12    25    1    28-11-2024
Đã 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.