Nested transaction

Nested transaction

With reference to a database transaction, a nested transaction occurs when a new transaction is started by an instruction that is already inside an existing transaction. The new transaction is said to be nested within the existing transaction, hence the term.

Nested transactions are implemented differently in different databases. However, they have in common that the changes are not made visible to any unrelated transactions until the outermost transaction has committed. This means that a commit in an inner transaction does not necessary persist updates to the database.

In some databases, changes made by the nested transaction are not seen by the 'host' transaction until the nested transaction is committed. According to some,[who?] this follows from the isolation property of transactions.

The capability to handle nested transactions properly is a prerequisite for true component based application architectures. In a component-based encapsulated architecture, nested transactions can occur without the programmer knowing it. A component function may or may not contain a database transaction (this is the encapsulated secret of the component. See Information hiding). If a call to such a component function is made inside a BEGIN - COMMIT bracket, nested transactions occur. Since popular databases like MySQL[1] do not allow nesting BEGIN - COMMIT brackets, a framework or a transaction monitor is needed to handle this. When we speak about nested transactions, it should be made clear that this feature is DBMS dependent and is not available for all databases.

Theory for nested transactions is similar to the theory for flat transactions, and was introduced in the following paper:

  • Resende, R.F.; El Abbadi, A. (1994-05-25). "On the serializability theorem for nested transactions". Information Processing Letters 50 (4): 177–183. doi:10.1016/0020-0190(94)00033-6. 

The banking industry usually processes financial transactions using Open Nested Transactions, which is a looser variant of the nested transaction model that provides higher performance while accepting the accompanying trade-offs of inconsistency. Open Nested Transactions are discussed in the following paper:

Further reading

  • Gerhard Weikum, Gottfried Vossen, Transactional information systems: theory, algorithms, and the practice of concurrency control and recovery, Morgan Kaufmann, 2002, ISBN 1558605088

References

  1. ^ "Statements That Cause an Implicit Commit". MySQL 4.1 Reference Manual. Oracle. http://dev.mysql.com/doc/refman/4.1/en/implicit-commit.html. Retrieved 5 December 2010. 

Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Java Transaction API — The Java Transaction API (JTA) is one of the Java EE APIs allowing distributed transactions to be done across multiple XA resources. JTA is a specification developed under the Java Community Process as JSR 907. JTA provides for:* demarcation of… …   Wikipedia

  • Database transaction — A transaction comprises a unit of work performed within a database management system (or similar system) against a database, and treated in a coherent and reliable way independent of other transactions. Transactions in a database environment have …   Wikipedia

  • Mobile Transaction Models — A Database transaction is defined as unit of processes which change a database from one consistent state to another consistent state. Normally a flat transaction follows the basic properties named as ACID (Atomicity, Consistence, Isolation,… …   Wikipedia

  • Extensible Storage Engine — For JET Red storage engine of Microsoft Access, see Microsoft Jet Database Engine. For the teacher s term, Exceptional education. Extensible Storage Engine (ESE), also known as JET Blue, is an Indexed Sequential Access Method (ISAM) data storage… …   Wikipedia

  • Spring Framework — Infobox Software name = Spring Framework caption = developer = [http://www.springsource.com SpringSource] latest release version = 2.5.5 latest release date = release date|2008|06|23 latest preview version = latest preview date = operating system …   Wikipedia

  • Indus programming language — Indus is an object oriented programming language for Ubiquitous computing. The primary components of the Indus platform are a programming language to implement software agents, libraries to provide services to agents on a distributed network, and …   Wikipedia

  • RAID — This article is about the data storage technology. For other uses, see Raid (disambiguation). RAID, an acronym for Redundant Array of Independent Disks (originally Redundant Array of Inexpensive Disks),[1] is a storage… …   Wikipedia

  • Tuxedo (software) — Infobox Software name = BEA Tuxedo caption = BEA Tuxedo developer = Oracle Corporation latest release version = 10 latest release date = 2 October, 2007 programming language = C, C++, COBOL operating system = Cross platform genre = Application… …   Wikipedia

  • Query optimizer — The query optimizer is the component of a database management system that attempts to determine the most efficient way to execute a query. The optimizer considers the possible query plans for a given input query, and attempts to determine which… …   Wikipedia

  • Database normalization — In the design of a relational database management system (RDBMS), the process of organizing data to minimize redundancy is called normalization. The goal of database normalization is to decompose relations with anomalies in order to produce… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”