A Reader in Transaction Processing

A database transaction is an execution of a collection of database operations, which is executed with a set of guaranteed properties. Traditionally, transactions have a flat structure and follow the ACID properties. The DBMS software guarantees atomicity (A), consistency (C), isolation (I), and durability (D) for each transaction through transaction management protocols and mechanisms, such as commit protocols and concurrency control mechanisms. Traditional transaction management is described in most database systems textbooks. A classical and very good book, focusing on transaction management only, is Concurrency Control and Recovery in Database Systems by Bernstein, Hadzilacos and Goodman. (You can download the complete book.) Other books on transaction processing: Transaction Processing: Concepts and Techniques by Gray and Reuter, and Principles of Transaction Processing for the Systems Professional by Bernstein and Newcomer.

Using databases in more and more complex application domains, stresses the limits of both functionality and performance of traditional transaction management. Transaction management requirements in advanced applications such as electronic commerce, workflow, design applications, multimedia applications, software development, and multidatabase systems are different from those in conventional applications such as traditional banking and airline reservation systems. Many new applications require advanced transaction processing, where traditional transaction properties, especially the atomicity and isolation properties, are challenged. The flat transaction structure is often abandoned in favour of some form of nested transaction model, atomicity is replaced by "semantic atomicity", and serializability (which is the correctness criterion guaranteeing isolation) is replaced by some non-serializable correctness criterion. There is a variety of concurrency control techniques guaranteeing different flavours of non-serializability. These techniques often use semantic information about transactions and/or objects to guarantee correctness for concurrent transactions while at the same time allowing more concurrency.

One particular problem in many advanced applications, is the need to support long- lasting transactions. The length of duration of a long-lasting transaction may cause serious performance problems if it is allowed to lock resources until it commits. This may either force other transactions to wait for resources for an unacceptable long time, or it may increase the likelihood of transaction abort. Aborting a long-lasting transaction may have a negative effect on both response time and throughput. If the long transaction has a flat structure, a failure will cause the whole transaction to be undone and possibly reexecuted. This is a very expensive recovery strategy, especially if the failure occurred after executing most of the transaction.

Decomposing the transaction into a number of subtransactions is one way of dealing with these problems. Each subtransactions is typically executed and committed/aborted independently of the top level transaction. This makes it possible to abort some part of a transaction without aborting the whole long-lasting transaction. An aborted subtransaction can be reexecuted or an alternative subtransaction can be executed instead of the one that failed. Such a transaction execution gives a semantic form of atomicity, instead of the conventional strict form of atomicity. Decomposing transactions may also positively effect the concurrency of transactions. Since subtransactions commit independently of the top level transaction, locks held by the subtransaction may be released at subtransaction commit time. If the unlocked resources are made publicly available at subtransaction commit time, this will increase concurrency in the system. However, early release of locks will also effect recovery, in that conventional rollback is no longer sufficient. Compensation is needed if the results of a subtransaction is made publicly available before commit of the top level transaction. Decomposition of transactions is one approach, used in several transaction processing techniques, to adapt transaction processing to new types of applications.

Traditional concurrency control uses serializability as the correctness criterion determining legal interleaving of transaction. The techniques guaranteeing serializability very often use some form of Two-phase locking. While serializability and Two-phase locking is well suited for controlling execution of short transactions, more concurrency is needed in many new types of applications such as applications running long-lasting transactions. To make concurrency control more suitable for new types of applications, two main approaches have been followed. The first approach provides new concurrency control mechanisms, while serializability is kept as the correctness criterion. The second approach relaxes serializability and provide new correctness criteria that allow more concurrency among transactions.

Ramamritham and Chrysanthis present a tutorial text on Advances in concurrency control and transaction processing, that summarizes much of the work on advanced transaction processing. It provides a quick overview of the area and gives the reader a feeling of what has been done (up to 1997) and what remains to be done. A collection of papers covering different aspects of advanced transaction processing is found in Advanced Transaction Models and Architectures, Kluwer 1997, edited by Jajodia and Kerschberg, and in Database Transaction Models For Advanced Applications, Morgan Kaufmann 1992, edited by A. Elmagarmid. Two survey papers on advanced transaction processing are found in: Y. Breitbart, H. Garcia-Molina, A. Silberschatz: Overview of Multidatabase Transaction Management, VLDB Journal 1(2), 1992, and N. Barghouti, G. Kaiser: Concurrency Control in Advanced Database Applications, ACM Computing Survey 23(2), 1991.

Advanced transaction processing is a general term that covers many different transaction management techniques designed with different applications in mind. An important limitation of most extended transaction models is that they have been proposed with specific applications in mind, and that they fail to support applications with slightly different requirements. This limits the flexibility of the models. A DBMS will typically provide one specific transaction model not specified by the user. This system will in most cases not have the expressive power to support applications with somewhat different requirements.

Some transaction frameworks have been motivated by a desire to make transaction processing more flexible, and by a desire to compare transaction models in order see how transaction model differ and whether they can be used in conjunction. Models allowing a flexible transaction structuring, by letting the user specify dependencies between subtransactions are described in: A. Biliris, S. Dar, N. Gehani, H. Jagadish, K. Ramamritham: ASSET: A System for Supporting Extended Transactions, Sigmod Record 23(2), June 1994; O. Bukhres, A. Elmagarmid, E. Kuhn: Implementation of the Flex Transaction Model, Data Engineering Bulletin 16(2), June 1993 (special issue on workflow and extended transaction systems); D. Georgakopoulos, M. Hornick, P. Krychniak, F. Manola: Specification and Management of Extended Transactions in a Programmable Transaction Environment, Proc. of the 10th International Conference on Data Engineering, 1994.

Some work has taken a tool-kit approach to transaction management, presenting a framework for transaction management that is able to support more than one transaction model. See the work of: P. Chrysanthis, K. Ramamritham: Synthesis of Extended Transaction Models using ACTA, ACM Transaction on Database Systems, 19(3), 1994; L. Mancini, I. Ray, S. Jajodia, E. Bertino: Flexible Transaction Dependencies in Database Systems, Distributed and Parallel Databases, Kluwer Academic Publishers, 8(4), 2000; two papers from Advanced Transaction Models and Architectures, Kluwer 1997: L. Mancini, I. Ray, S. Jajodia, E. Bertino: Flexible Commit Protocols for Advanced Transaction Processing and R. Barga, C. Pu: A Reflective Framework for Implementing Extended Transactions; and one paper from Database Transaction Models For Advanced Applications, Morgan Kaufmann 1992: R. Unland, G. Schlageter: A Transaction Manager Development Facility for Non Standard Database Systems.