cs411-10-tranmgr - 1 CS411 Database Systems 10: Transaction...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: 1 CS411 Database Systems 10: Transaction Management 2 Why Do We Learn This? 2 3 Outline Transaction management motivation & brief introduction major issues recovery concurrency control Recovery 4 Users and DB Programs End users don't see the DB directly are only vaguely aware of its design may be acutely aware of part of its contents SQL is not a suitable end-user interface A single SQL query is not a sufficient unit of DB work May need more than one query May need to check constraints not enforced by the DBMS May need to do calculations, realize business rules, etc. 5 Users and DB Programs Ergo, a program is needed to carry out each unit of DB work End users interact with DB programs Rather than SQL May be many users simultaneously Thus many simultaneous executions of these programs Each user expects service and correct operation A user should not have to wait forever A user should not be affected by errors of others 6 Definition of "Transaction" Definition: A transaction is the execution of a DB program. DB applications are designed as a set of transactions Typical transaction starts with data from user or from another transaction includes DB reads/writes ends with display of data or form, or with request to start another transaction 7 Behind the Scene: Who invented Transaction? Edgar Codd? Jim Gray? Al Gore? 8 9 And He is a Key Contributor From: Jim Gray at IBM: the transaction processing revolution. Bruce G. Lindsay. ACM SIGMOD Record. 37(2). June 2008. 10 Atomicity Transactions must be "atomic" Their effect is all or none DB must be consistent before and after the transaction executes (not necessarily during!) EITHER a transaction executes fully and "commits" to all the changes it makes to the DB OR it must be as though that transaction never executed at all 11 A Typical Transaction User view: Transfer money from savings to checking Program: read savings; verify balance is adequate; update savings balance; read checking; update checking balance; 12 "Commit" and "Abort" A transactions which only READs expects DB to be consistent, and cannot cause it to become otherwise. When a transaction which does any WRITE finishes, it must either COMMIT : "I'm done and the DB is consistent again" OR ABORT (ROLLBACK) : "I'm done but I goofed: my changes must be undone." 13 Complications A DB may have many simultaneous users simultaneous users implies simultaneous transactions implies simultaneous DB access multiprogramming/multiprocessing Things can go wrong!...
View Full Document

This note was uploaded on 02/17/2012 for the course CS 411 taught by Professor Winslett during the Spring '07 term at University of Illinois at Urbana–Champaign.

Page1 / 59

cs411-10-tranmgr - 1 CS411 Database Systems 10: Transaction...

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

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