{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

TRANSACTION. - Chapter 15 Transactions Database System...

Info icon This 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
Image of page 1

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

View Full Document Right 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.
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)
Image of page 3

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

View Full Document Right 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)
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.
Image of page 5

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

View Full Document Right Arrow Icon
©Silberschatz, Korth and Sudarshan 15.6 Database System Concepts - 5 th Edition, Sep 12, 2006. Transaction State (Cont.) Transaction State (Cont.)
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 T i and T j , it appears to T i that either T j , finished execution before T i started, or T j started execution after T i finished.
Image of page 7

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern