TAILIEUCHUNG - Setting the Transaction Isolation Level

Setting the Transaction Isolation Level The transaction isolation level is the degree to which the changes made by one transaction are separated from other concurrent transactions. | Setting the Transaction Isolation Level The transaction isolation level is the degree to which the changes made by one transaction are separated from other concurrent transactions. Before I get into the details of the various transaction isolation levels you need to understand the types of problems that might occur when current transactions attempt to access the same rows in a table. In the following list I ll use examples of two concurrent transactions that are accessing the same rows to illustrate the three types of potential transaction processing problems Phantoms Transaction 1 reads a set of rows returned by a specified WHERE clause. Transaction 2 then inserts a new row which also happens to satisfy the WHERE clause of the query previously used byTransaction 1. Transaction 1 then reads the rows again using the same query but now sees the additional row just inserted by Transaction 2. This new row is known as a phantom because to Transaction 1 this row seems to have magically appeared. Nonrepeatable reads Transaction 1 reads a row and Transaction 2 updates the same row just read by Transaction 1. Transaction 1 then reads the same row again and discovers that the row it read earlier is now different. This is known as a nonrepeatable read because the row originally read by Transaction 1 has been changed. Dirty reads Transaction 1 updates a row but doesn t commit the update. Transaction 2 reads the updated row. Transaction 1 then performs a rollback undoing the previous update. Now the row just read by Transaction 2 is no longer valid or it s dirty because the update made by Transaction 1 wasn t committed when the row was read by Transaction 2. To deal with these potential problems databases implement various levels of transaction isolation to prevent concurrent transactions from interfering with each other. The SQL standard defines four isolation levels which are shown in Table . These levels are shown in order of increasing isolation. Table SQL Standard

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.