TRANSACTION. - Chapter 15: Transactions Database System...

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

View Full Document Right Arrow Icon
Database System Concepts, 5th Ed . ©Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use Chapter 15: Transactions Chapter 15: Transactions
Background image of page 1

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

View Full DocumentRight Arrow Icon
©Silberschatz, Korth and Sudarshan 15.2 Database System Concepts - 5 th Edition, Sep 12, 2006. Chapter 15: Transactions Chapter 15: Transactions Transaction Concept Transaction State Implementation of Atomicity and Durability Concurrent Executions Serializability Recoverability Implementation of Isolation Transaction Definition in SQL Testing for Serializability.
Background image of page 2
©Silberschatz, Korth and Sudarshan 15.3 Database System Concepts - 5 th Edition, Sep 12, 2006. Transaction Concept Transaction Concept A Transaction is a list of actions to perform a single logical unit of work. or A transaction is a unit of program execution that accesses and possibly updates various data items. Two main issues to deal with: Failures of various kinds, such as hardware failures and system crashes Concurrent execution of multiple transactions Access to the DB is done by two operations: Read(x) Write(x)
Background image of page 3

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

View Full DocumentRight Arrow Icon
©Silberschatz, Korth and Sudarshan 15.4 Database System Concepts - 5 th Edition, Sep 12, 2006. E.g. transaction to transfer $50 from account A to account B: T1: 1. read ( A ) 2. A := A – 50 3. write ( A ) 4. read ( B ) 5. B := B + 50 6. write ( B)
Background image of page 4
©Silberschatz, Korth and Sudarshan 15.5 Database System Concepts - 5 th Edition, Sep 12, 2006. Transaction State Transaction State Active the initial state; the transaction stays in this state while it is executing Partially committed after the final statement has been executed. Failed -- after the discovery that normal execution can no longer proceed. Aborted – after the transaction has been rolled back and the database restored to its state prior to the start of the transaction. Two options after it has been aborted: restart the transaction kill the transaction Committed – after successful completion. A transaction is said to have terminated if it has either committed or aborted.
Background image of page 5

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

View Full DocumentRight Arrow Icon
©Silberschatz, Korth and Sudarshan 15.6 Database System Concepts - 5 th Edition, Sep 12, 2006. Transaction State (Cont.) Transaction State (Cont.)
Background image of page 6
©Silberschatz, Korth and Sudarshan 15.7 Database System Concepts - 5 th Edition, Sep 12, 2006. ACID Properties ACID Properties Atomicity . Either all operations of the transaction are properly reflected in the database or none are. Consistency . Execution of a transaction in isolation preserves the consistency of the database. Isolation . Although multiple transactions may execute concurrently, each transaction must be unaware of other concurrently executing transactions. Intermediate transaction results must be hidden from other concurrently executed transactions. That is, for every pair of transactions
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/23/2012 for the course CS 101 taught by Professor Martand during the Spring '10 term at Punjab Engineering College.

Page1 / 50

TRANSACTION. - Chapter 15: Transactions Database System...

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