lec22 - Intro to Transactions Chapter 16 4/3/11 EECS 484:...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1 4/3/11 EECS 484: Database Management Systems, Kristen LeFevre 1 Intro to Transactions Chapter 16 4/3/11 EECS 484: Database Management Systems, Kristen LeFevre 2 Transactions (Motivation) So far, we have made some big assumptions about the DBMS… Only one user System never fails New Challenges What if there are many users, simultaneously issuing requests to the same database? What if the system crashes, failing to complete a query or update? Can produce unexpected results if we aren’t careful!
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 4/3/11 EECS 484: Database Management Systems, Kristen LeFevre 3 Example 1 Transaction (def): An atomic unit of work E.g., Debiting $25 from bank account Can consist of multiple actions (e.g., reads and writes) Bank Balance : $100 Sufficient funds? Sufficient funds? New balance: $75 New balance: $75 Bank Balance : $75! Read Balance: $100 Read Balance: $100 You Your Significant Other Pay $25 Yes Pay $25 Yes Read (A); Check (A > $25); Pay ($25); A = A – 25; Write (A); 4/3/11 EECS 484: Database Management Systems, Kristen LeFevre 4 Transactions (Motivation) Interleaving actions from different transactions can cause inconsistencies Possible Solutions? Naïve approach : Only admit one transaction at a time, and wait for it to finish before admitting another. Downsides? Lower resource utilization Long-running requests may “starve” other requests Goal (1) : Allow interleaving, but guarantee the same result as executing transactions serially (one after another)
Background image of page 2
3 4/3/11 EECS 484: Database Management Systems, Kristen LeFevre 5 Example 2 Bank Balance : $100 Sufficient funds? New balance: $75 Bank Balance : $75! Read Balance: $100 You Pay $25 Yes Read (A); Check (A > $25); Pay ($25); A = A – 25; Write (A); Goal (2): Guarantee that changes made by partially completed transactions are not seen by other transactions 4/3/11 EECS 484: Database Management Systems, Kristen LeFevre
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/08/2011 for the course EECS 484 taught by Professor Staff during the Winter '08 term at University of Michigan.

Page1 / 11

lec22 - Intro to Transactions Chapter 16 4/3/11 EECS 484:...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online