ch15 - Chapter15:Transactions n n n n Motivation...

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

View Full Document Right Arrow Icon
1 Chapter 15:  Transactions n Motivation n What is transaction n Problem of concurrent execution of transactions n Transaction states
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 Motivation Suppose you design a database for a bank. What happens if the bank DB crashes when a  customer is transferring money between two  accounts?  Checking: 1000 Saving: 1000 Before Update Checking: 1000-500 Saving: 1000 Checking: 500 Saving: 1000+500 Checking: 500 Saving: 1500 After
Background image of page 2
3 Chapter 15:  Transactions n Motivation n What is transaction n Problem of concurrent execution of transactions n Transaction states
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Transaction Concept n transaction   is a  unit   of program execution  that may contain multiple SQL statements n Either all the SQL statements succeed or none of  them succeed n E.g., transfer money from one account to another,  the money has either been transferred successfully,  or not transferred at all
Background image of page 4
5 ACID Properties n Atomicity  Either all operations of the transaction  are properly reflected in the database or none are. To preserve consistency of data, the database system must ensure: Checking: 1000 Saving: 1000 Before Update Checking: 1000-500 Saving: 1000 Checking: 500 Saving: 1000+500 Checking: 500 Saving: 1500 After What are the valid values for Checking and  Saving in the database after this transaction?
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 ACID Properties n Consistency .   If each transaction has no logical error,  execution of a transaction in isolation preserves the  consistency of the database. n E.g. n Transaction to transfer $500 from account  A  to account  B n Consistency requirement – the sum of  and  is unchanged by the  execution of the transaction n In general, if the values in database are the same as a sequential  execution, the database is always consistent
Background image of page 6
7 ACID Properties
Background image of page 7

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

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

This note was uploaded on 02/28/2012 for the course IS 620 taught by Professor Chen,z during the Spring '08 term at UMBC.

Page1 / 24

ch15 - Chapter15:Transactions n n n n Motivation...

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

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