Two operations are said to be in conflict, when all of the following three conditions exists simultaneously − In a schedule comprising of multiple transactions, a conflict occurs when two active transactions perform non-compatible operations. This is depicted in the following graph − the transactions contain operations that overlap at time. Parallel Schedules − In parallel schedules, more than one transactions are active simultaneously, i.e. Serial Schedules − In a serial schedule, at any point of time, only one transaction is active, i.e. Given a schedule S comprising of n transactions, say T1, T2, T3……….Tn for any transaction Ti, the operations in Ti must execute as laid down in the schedule S. In a system with a number of simultaneous transactions, a schedule is the total order of execution of operations. There should not be any interference from the other concurrent transactions that are simultaneously running.ĭurability − If a committed transaction brings about a change, that change should be durable in the database and not lost in case of any failure. Isolation − A transaction should be executed as if it is the only one in the system. It should not adversely affect any data item in the database. No partial update should exist.Ĭonsistency − A transaction should take the database from one consistent state to another consistent state. Atomicity, Consistency, Isolation, and Durability.Ītomicity − This property states that a transaction is an atomic unit of processing, that is, either it is performed in its entirety or not performed at all. Desirable Properties of TransactionsĪny transaction must maintain the ACID properties, viz. The following state transition diagram depicts the states in the transaction and the low level transaction operations that causes change in states. Partially Committed − The transaction enters this state after the last statement of the transaction has been executed.Ĭommitted − The transaction enters this state after successful completion of the transaction and system checks have issued commit signal.įailed − The transaction goes from partially committed state or active state to failed state when it is discovered that normal execution can no longer proceed or system checks fail.Īborted − This is the state after the transaction has been rolled back after failure and the database has been restored to its state that was before the transaction began. The transaction remains in this state while it is executing read, write or other operations. A committed transaction cannot be rolled back.Ī transaction may go through a subset of five states, active, partially committed, committed, failed and aborted.Īctive − The initial state where the transaction enters is the active state. Rollback − A signal to specify that the transaction has been unsuccessful and so all temporary changes in the database are undone. Read_item or write_item − Database operations that may be interleaved with main memory operations as a part of transaction.Įnd_transaction − A marker that specifies end of transaction.Ĭommit − A signal to specify that the transaction has been successfully completed in its entirety and will not be undone. The low level operations performed in a transaction are −īegin_transaction − A marker that specifies start of transaction execution. Likewise, for all transactions, read and write forms the basic database operations. Write_item() − write the modified value from main memory to storage.ĭatabase access is restricted to read_item() and write_item() operations. Modify_item() − change value of item in the main memory. Read_item() − reads data item from storage to main memory. For example, a data update operation can be divided into three tasks − A transaction involving only data retrieval without any data update is called read-only transaction.Įach high level operation can be divided into a number of low level tasks or operations. It is an atomic process that is either performed into completion entirely or is not performed at all. The operations performed in a transaction include one or more of database operations like insert, delete, update or retrieve data. TransactionsĪ transaction is a program including a collection of database operations, executed as a logical unit of data processing. In the last portion, we will look over schedules and serializability of schedules. We’ll also study the low level tasks included in a transaction, the transaction states and properties of a transaction. This chapter discusses the various aspects of transaction processing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |