
Bài giảng Thiết kế và quản trị cơ sở dữ liệu - Chương 6: Crash Recovery
Thông tin tài liệu:
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 6: Crash RecoveryCrash RecoveryVu Tuyet Trinhtrinhvt@it-hut.edu.vnDepartment of Information Systems, Faculty of Information TechnologyHanoi University of TechnologyTransactioncollection of action that preserve consistencyConsistent DBTConsistent DB’with assumptionIFTHENT starts with consistent state +T executes in isolationT leaves consistent state1How can constraints be violated?Transaction bugDBMS bugHardware failuree.g., disk crashData sharinge.g.,T1 and T2 in parallelFailuresEventsDesiredUndesiredExpectedUnexpectedprocessorCPUmemorydiskMD2RecoveryMaintaining the consistency of DB by ROLLBACK to thelast consistency state.Ensuring 2 propertiesAtomicDurabilityUsing LOGTransaction LogA sequence of log record keeping trace ofactions executed by DBMSLog the beginning of the transaction executiontransaction is already finishedTransaction is calcelTransaction makes an update actio, before update X=v, afterupdate x = w3Transaction LogHandled in main memory and put to externalmemory (disk) when possibleA = 8 16B = 8 16ActionsDataLogLogDiskMemoryCheckpointDefinition:Objectivemoment where intermediate results and a log record are savedto disk.being initiated at specified intervalsminimize the amount of time and effort wasted when restartthe process can be restarted from the latest checkpoint ratherthan from the beginning.Log record or 4Undo-loggingStepActiontMem A881616Mem BDisk ADisk B88888888815Read(B,t)8161686t:=t*216168887161616888Write(B,t)Flush log9Output(A)16161616810Output(B)1616161616234Read(A,t)t:=t*2Write(A,t)1112Mem LogFlush logUndo-Logging Rules(1) For every action generate undo log record (containingold value)(2) Before X is modified on disk, log records pertaining to Xmust be on disk (write ahead logging: WAL)(3) Before commit is flushed to log, all writes of transactionmust be reflected on disk5
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 Hệ quản trị cơ sở dữ liệu Undo-logging rules Undo logging recovery rules Undo-loggingTài liệu có liên quan:
-
Giáo án Tin học lớp 12 (Trọn bộ cả năm)
180 trang 305 0 0 -
Thực hiện truy vấn không gian với WebGIS
8 trang 278 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 254 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 186 1 0 -
Bài tập thiết kế cơ sở dữ liệu
9 trang 175 0 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 166 0 0 -
54 trang 155 0 0
-
69 trang 151 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 149 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 146 0 0 -
Đề tài: Phân tích thiết kế hệ thống quản lý Quán Game GameTV Net 192 Trần Đại Nghĩa
18 trang 144 0 0 -
Luận văn tốt nghiệp: Thiết kế cơ sở dữ liệu cho bài toán quản lý cán bộ
27 trang 135 0 0 -
Khóa luận tốt nghiệp Công nghệ thông tin: Xây dựng website bán hàng nông sản
85 trang 135 0 0 -
Tiểu Luận Chương Trình Quản Lí Học Phí Trường THPT
18 trang 100 0 0 -
57 trang 90 0 0
-
Giáo trình: Hệ quản trị cơ sở dữ liệu - Nguyễn Trần Quốc Vinh
217 trang 89 0 0 -
Bài giảng Khái niệm về hệ cơ sở dữ liệu: Bài 2 - Hệ quản trị cơ sở dữ liệu
13 trang 88 0 0 -
34 trang 85 0 0
-
Giáo trình Hệ quản trị cơ sở dữ liệu - Trần Thiên Thành
130 trang 83 0 0 -
Phát triển Java 2.0: Phân tích dữ liệu lớn bằng MapReduce của Hadoop
12 trang 77 0 0