![Phân tích tư tưởng của nhân dân qua đoạn thơ: Những người vợ nhớ chồng… Những cuộc đời đã hóa sông núi ta trong Đất nước của Nguyễn Khoa Điềm](https://timtailieu.net/upload/document/136415/phan-tich-tu-tuong-cua-nhan-dan-qua-doan-tho-039-039-nhung-nguoi-vo-nho-chong-nhung-cuoc-doi-da-hoa-song-nui-ta-039-039-trong-dat-nuoc-cua-nguyen-khoa-136415.jpg)
Bài giảng Thiết kế và quản trị cơ sở dữ liệu - Chương 5: Concurrency
Số trang: 11
Loại file: pdf
Dung lượng: 331.30 KB
Lượt xem: 3
Lượt tải: 0
Xem trước 2 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Nội dung chính được trình bày trong chương này gồm có: Transaction, automicity, consistency, isolation, durability, transaction states, transaction management interfaces, concurrency control, serializability,...
Nội dung trích xuất từ tài liệu:
Bài giảng Thiết kế và quản trị cơ sở dữ liệu - Chương 5: ConcurrencyConcurrencyVu Tuyet Trinhtrinhvt@it-hut.edu.vnDepartment of Information Systems, Faculty of Information TechnologyHanoi University of TechnologyExample500USDAccount AAccount Bread(A)If A > 500 thenB:=B+500A:=A-500CrashWhat happen???21TransactionA sequence of read and write operations on data itemsthat logically functions as one unit of workAssuring data integrity and correctionACID PropertiesConcurrencyControlAtomicityConsistencyIsolationDurabilityRecovery3Automicityguarantee that either all of the tasks of a transaction areperformed or none of them areExampleT: Read(A,t1);If t1 > 500 {Read(B,t2);t2:=t2+500;Write(B,t2);t1:=t1-500;Write(A,t1);}crash42Consistencyensures that the DB remains in a consistentstate before the start of the transaction and afterthe transaction is overExampleA+B = CT: Read(A,t1);If t1 > 500 {Read(B,t2);t2:=t2+500;Write(B,t2);t1:=t1-500;Write(A,t1);}A+B = C5Isolationability of the application to make operations in atransaction appear isolated from all other operations.Example A= 5000, B= 3000T: Read(A,t1);If t1 > 500 {Read(B,t2);t2:=t2+500;Write(B,t2);t1:=t1-500;Write(A,t1);}T’: A+B(= 5000+3500)(A+B = 4500+3500)63Durabilityguarantee that once the user has been notified ofsuccess, the transaction will persist, and not be undoneVí dụ: A= 5000, B= 3000T: Read(A,t1);If t1 > 500 {Read(B,t2);t2:=t2+500;Write(B,t2);t1:=t1-500;Write(A,t1);}crash7A= 4500, B=3500Transaction States84Transaction Management InterfacesBegin TransCommit ()Abort()Savepoint Save()Rollback (savepoint)(savepoint = 0 ==> Abort)9Concurrency ControlObjective:ensures that database transactions are performed concurrentlywithout the concurrency violating the data integrityguarantees that no effect of committed transactions is lost, andno effect of aborted (rolled back) transactions remains in therelated database.ExampleT0: read(A);A := A -50;write(A);read(B);B := B + 50;write(B);T1:read(A);temp := A *0.1;A := A -temp;write(A);read(B);B := B + temp;write(B);105
Nội dung trích xuất từ tài liệu:
Bài giảng Thiết kế và quản trị cơ sở dữ liệu - Chương 5: ConcurrencyConcurrencyVu Tuyet Trinhtrinhvt@it-hut.edu.vnDepartment of Information Systems, Faculty of Information TechnologyHanoi University of TechnologyExample500USDAccount AAccount Bread(A)If A > 500 thenB:=B+500A:=A-500CrashWhat happen???21TransactionA sequence of read and write operations on data itemsthat logically functions as one unit of workAssuring data integrity and correctionACID PropertiesConcurrencyControlAtomicityConsistencyIsolationDurabilityRecovery3Automicityguarantee that either all of the tasks of a transaction areperformed or none of them areExampleT: Read(A,t1);If t1 > 500 {Read(B,t2);t2:=t2+500;Write(B,t2);t1:=t1-500;Write(A,t1);}crash42Consistencyensures that the DB remains in a consistentstate before the start of the transaction and afterthe transaction is overExampleA+B = CT: Read(A,t1);If t1 > 500 {Read(B,t2);t2:=t2+500;Write(B,t2);t1:=t1-500;Write(A,t1);}A+B = C5Isolationability of the application to make operations in atransaction appear isolated from all other operations.Example A= 5000, B= 3000T: Read(A,t1);If t1 > 500 {Read(B,t2);t2:=t2+500;Write(B,t2);t1:=t1-500;Write(A,t1);}T’: A+B(= 5000+3500)(A+B = 4500+3500)63Durabilityguarantee that once the user has been notified ofsuccess, the transaction will persist, and not be undoneVí dụ: A= 5000, B= 3000T: Read(A,t1);If t1 > 500 {Read(B,t2);t2:=t2+500;Write(B,t2);t1:=t1-500;Write(A,t1);}crash7A= 4500, B=3500Transaction States84Transaction Management InterfacesBegin TransCommit ()Abort()Savepoint Save()Rollback (savepoint)(savepoint = 0 ==> Abort)9Concurrency ControlObjective:ensures that database transactions are performed concurrentlywithout the concurrency violating the data integrityguarantees that no effect of committed transactions is lost, andno effect of aborted (rolled back) transactions remains in therelated database.ExampleT0: read(A);A := A -50;write(A);read(B);B := B + 50;write(B);T1:read(A);temp := A *0.1;A := A -temp;write(A);read(B);B := B + temp;write(B);105
Tìm kiếm theo từ khóa liên quan:
Quản trị cơ sở dữ liệu Thiết kế cơ sở dữ liệu Transaction states Transaction management interfaces Concurrency control Hệ quản trị cơ sở dữ liệuTài liệu liên quan:
-
Giáo án Tin học lớp 12 (Trọn bộ cả năm)
180 trang 285 0 0 -
Thực hiện truy vấn không gian với WebGIS
8 trang 262 0 0 -
Đề cương chi tiết học phần Quản trị cơ sở dữ liệu (Database Management Systems - DBMS)
14 trang 252 0 0 -
Giáo trình Cơ sở dữ liệu: Phần 1 - Sở Bưu chính Viễn Thông TP Hà Nội
48 trang 181 1 0 -
Báo cáo Thực tập chuyên môn Thiết kế cơ sở dữ liệu: Xây dựng Website studio
26 trang 160 0 0 -
Bài tập thiết kế cơ sở dữ liệu
9 trang 159 0 0 -
54 trang 149 0 0
-
69 trang 148 0 0
-
Tiểu luận Phân tích và thiết kế hệ thống quản lý kết quả học tập sinh viên
32 trang 147 0 0 -
Bài giảng Cơ sở dữ liệu (Database) - Chương 2: Mô hình thực thể - liên kết
120 trang 143 0 0