Top Banner

Click here to load reader

Database Lecture 2

Nov 16, 2014

ReportDownload

Documents

nichada

Advanced Database Systems

Advanced Database Systems .. 1/2549 Advanced Database Systems 1/49-IS20.2 Transaction Processing Concept ......................................................................5 ACID Properties Transaction........................................................................................................................... 7 Transaction State..................................................................................................................................................... 9 Recovery ..........................................................................................................9 Failure Classification.............................................................................................................................................. 9 Transaction Recovery Problem Statement............................................................................................................ 11 Transaction Recovery .............................................................................................................................. 11 Idempotent ............................................................................................................................................................ 12 BIJ ....................................................................................................................................... 13 AIJ ....................................................................................................................................... 13 Log-based recovery............................................................................................................................ 13 Database Modification Technique................................................................................................ 15 Check point ........................................................................................................................................................... 16 Buffer Management .......................................................................................18 Log-record Buffering............................................................................................................................................ 19 Operating System Role in Buffer Management.................................................................................................... 19 Shadow Paging ..................................................................................................................................................... 21 Database Backup Concept .............................................................................22 Database Export/Import ........................................................................................................................................ 23 Concurrent Execution ....................................................................................24 Conflict Serializability.......................................................................................................................................... 27 View Serializability .............................................................................................................................................. 27 Recoverability....................................................................................................................................................... 29 Cascadeless Schedule ........................................................................................................................................... 30 Levels of consistency............................................................................................................................................ 30 2 Advanced Database Systems 1/49-IS20.2 4 Concurrency control........................................................................................................................ 31 Concurrency Control......................................................................................33 Lock-based Protocol ............................................................................................................................................. 33 2-Phase Locking Protocol ..................................................................................................................................... 34 Multiple Granularity ............................................................................................................................................. 35 Weak Level of Consistency.................................................................................................................................. 37 Timestamp-Base Protocol..................................................................................................................................... 37 Timestamp-Ordering Protocol .............................................................................................................................. 38 Thomas Write Rule ............................................................................................................................................. 39 Multiversion Timestamp Ordering ....................................................................................................................... 39 Multiversion 2-phase locking ............................................................................................................................... 40 Query Processing ...........................................................................................41 Relational algebra ................................................................................................................................................. 42 Database statistics..................................................................................................................................... 45 Selection Operation .............................................................................................................................................. 45 A1. Linear search ..................................................................................................................................... 45 A2. Binary search..................................................................................................................................... 45 A3. Primary index, equality on key ......................................................................................................... 46 A4. Primary index, equality on non-key .................................................................................................. 47 A5.1 Secondary index, equality on key ..................................................................................................... 47 A5.2 Secondary index, equality on non-key .............................................................................................. 47 Join Operation....................................................................................................................................................... 48 1. Nested-Loop Join................................................................................................................................... 48 2. Block Nested-Loop Join........................................................................................................................ 49 3. Indexed Nested-Loop Join..................................................................................................................... 49 4. Hash Join ............................................................................................................................................... 51 Hash Index............................................................................................................................................................ 52 3 Advanced Database Systems 1/49-IS20.2 Temporal Database ........................................................................................53 Valid-Time State Table......................................................................................................................................... 53 Duplication Concept ............................................................................................................................................. 54 Temporal Database ................................................................................................................................ 55 Temporal Join....................................................................................................................................................... 57 Modifying Valid-Time State Table....................................................................................................................... 59 Current Delete....................................................................................................................................................... 60 Current Update...................................................................................................................................................... 61 Sequence Insert ..................................................................................................................................................... 61 Sequence Delete.................................................................................................................................................... 61 Sequence Update .................................................................................................................................................. 63 Temporal SQL (Back in the Pens) ........................................................................................................................ 64 Transaction-Time State Table...............................

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.