Database-20-TransactionProcessing.pptx

A programmed abort in the transaction causes it to

Info icon This preview shows pages 15–21. Sign up to view the full content.

A programmed abort in the transaction causes it to fail. 4. Concurrency control enforcement: The concurrency control method may decide to abort the transaction, to be restarted later, because it violates serializability or because several transactions are in a state of deadlock (see Chapter 22). Transaction Processing 15
Image of page 15

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

Introduction to Transaction Processing Why recovery is needed (cont.): (What causes a Transaction to fail) 5. Disk failure: Some disk blocks may lose their data because of a read or write malfunction or because of a disk read/write head crash. This may happen during a read or a write operation of the transaction. 6. Physical problems and catastrophes: This refers to an endless list of problems that includes power or air-conditioning failure, fire, theft, sabotage, overwriting disks or tapes by mistake, and mounting of a wrong tape by the operator. Transaction Processing 16
Image of page 16
Transaction and System Concepts A transaction is an atomic unit of work that is either completed in its entirety or not done at all. For recovery purposes, the system needs to keep track of when the transaction starts, terminates, and commits or aborts. Transaction states : Active state Partially committed state Committed state Failed state Terminated State Transaction Processing 17
Image of page 17

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

Transaction and System Concepts Recovery manager keeps track of the following operations: begin_transaction : This marks the beginning of transaction execution. read or write : These specify read or write operations on the database items that are executed as part of a transaction. end_transaction : This specifies that read and write transaction operations have ended and marks the end limit of transaction execution. At this point it may be necessary to check whether the changes introduced by the transaction can be permanently applied to the database or whether the transaction has to be aborted because it violates concurrency control or for some other reason. Transaction Processing 18
Image of page 18
Transaction and System Concepts Recovery manager keeps track of the following operations (cont): commit_transaction : This signals a successful end of the transaction so that any changes (updates) executed by the transaction can be safely committed to the database and will not be undone. rollback (or abort ): This signals that the transaction has ended unsuccessfully, so that any changes or effects that the transaction may have applied to the database must be undone. Transaction Processing 19
Image of page 19

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

Transaction and System Concepts Recovery techniques use the following operators: undo : Similar to rollback except that it applies to a single operation rather than to a whole transaction. redo : This specifies that certain transaction operations must be redone to ensure that all the operations of a committed transaction have been applied successfully to the database.
Image of page 20
Image of page 21
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '09
  • SUNANHAN

{[ 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