Transaction processing

In computer science, transaction processing is information processing [1] that is divided into individual, indivisible operations called transactions. Each transaction must succeed or fail as a complete unit; it can never be only partially complete.

For example, when you purchase a book from an online bookstore, you exchange money (in the form of credit) for a book. If your credit is good, a series of related operations ensures that you get the book and the bookstore gets your money. However, if a single operation in the series fails during the exchange, the entire exchange fails. You do not get the book and the bookstore does not get your money. The technology responsible for making the exchange balanced and predictable is called transaction processing. Transactions ensure that data-oriented resources are not permanently updated unless all operations within the transactional unit complete successfully. By combining a set of related operations into a unit that either completely succeeds or completely fails, one can simplify error recovery and make one's application more reliable.

Transaction processing systems consist of computer hardware and software hosting a transaction-oriented application that performs the routine transactions necessary to conduct business. Examples include systems that manage sales order entry, airline reservations, payroll, employee records, manufacturing, and shipping.

Since most, though not necessarily all, transaction processing today is interactive, the term is often treated as synonymous with online transaction processing.

Description

Transaction processing is designed to maintain a system's Integrity (typically a database or some modern filesystems) in a known, consistent state, by ensuring that interdependent operations on the system are either all completed successfully or all canceled successfully.

For example, consider a typical banking transaction that involves moving $700 from a customer's savings account to a customer's checking account. This transaction involves at least two separate operations in computer terms: debiting the savings account by $700, and crediting the checking account by $700. If one operation succeeds but the other does not, the books of the bank will not balance at the end of the day. There must, therefore, be a way to ensure that either both operations succeed or both fail so that there is never any inconsistency in the bank's database as a whole.

Transaction processing links multiple individual operations in a single, indivisible transaction, and ensures that either all operations in a transaction are completed without error, or none of them are. If some of the operations are completed but errors occur when the others are attempted, the transaction-processing system "rolls back" all of the operations of the transaction (including the successful ones), thereby erasing all traces of the transaction and restoring the system to the consistent, known state that it was in before processing of the transaction began. If all operations of a transaction are completed successfully, the transaction is committed by the system, and all changes to the database are made permanent; the transaction cannot be rolled back once this is done.

Transaction processing guards against hardware and software errors that might leave a transaction partially completed. If the computer system crashes in the middle of a transaction, the transaction processing system guarantees that all operations in any uncommitted transactions are cancelled.

Generally, transactions are issued concurrently. If they overlap (i.e. need to touch the same portion of the database), this can create conflicts. For example, if the customer mentioned in the example above has $150 in his savings account and attempts to transfer $100 to a different person while at the same time moving $100 to the checking account, only one of them can succeed. However, forcing transactions to be processed sequentially is inefficient. Therefore, concurrent implementations of transaction processing is programmed to guarantee that the end result reflects a conflict-free outcome, the same as could be reached if executing the transactions sequentially in any order (a property called serializability). In our example, this means that no matter which transaction was issued first, either the transfer to a different person or the move to the checking account succeeds, while the other one fails.

Methodology

The basic principles of all transaction-processing systems are the same. However, the terminology may vary from one transaction-processing system to another, and the terms used below are not necessarily universal.

Rollback

Transaction-processing systems ensure database integrity by recording intermediate states of the database as it is modified, then using these records to restore the database to a known state if a transaction cannot be committed. For example, copies of information on the database prior to its modification by a transaction are set aside by the system before the transaction can make any modifications (this is sometimes called a before image). If any part of the transaction fails before it is committed, these copies are used to restore the database to the state it was in before the transaction began.

Rollforward

It is also possible to keep a separate journal of all modifications to a database management system. (sometimes called after images). This is not required for rollback of failed transactions but it is useful for updating the database management system in the event of a database failure, so some transaction-processing systems provide it. If the database management system fails entirely, it must be restored from the most recent back-up. The back-up will not reflect transactions committed since the back-up was made. However, once the database management system is restored, the journal of after images can be applied to the database (rollforward) to bring the database management system up to date. Any transactions in progress at the time of the failure can then be rolled back. The result is a database in a consistent, known state that includes the results of all transactions committed up to the moment of failure.

Deadlocks

In some cases, two transactions may, in the course of their processing, attempt to access the same portion of a database at the same time, in a way that prevents them from proceeding. For example, transaction A may access portion X of the database, and transaction B may access portion Y of the database. If at that point, transaction A then tries to access portion Y of the database while transaction B tries to access portion X, a deadlock occurs, and neither transaction can move forward. Transaction-processing systems are designed to detect these deadlocks when they occur. Typically both transactions will be cancelled and rolled back, and then they will be started again in a different order, automatically, so that the deadlock does not occur again. Or sometimes, just one of the deadlocked transactions will be cancelled, rolled back, and automatically restarted after a short delay.

Deadlocks can also occur among three or more transactions. The more transactions involved, the more difficult they are to detect, to the point that transaction processing systems find there is a practical limit to the deadlocks they can detect.

Compensating transaction

In systems where commit and rollback mechanisms are not available or undesirable, a compensating transaction is often used to undo failed transactions and restore the system to a previous state.

ACID criteria

Jim Gray defined properties of a reliable transaction system in the late 1970s under the acronym ACID—atomicity, consistency, isolation, and durability.[1]

Atomicity

A transaction's changes to the state are atomic: either all happen or none happen. These changes include database changes, messages, and actions on transducers.

Consistency

Consistency: A transaction is a correct transformation of the state. The actions taken as a group do not violate any of the integrity constraints associated with the state.

Isolation

Even though transactions execute concurrently, it appears to each transaction T, that others executed either before T or after T, but not both.

Durability

Once a transaction completes successfully (commits), its changes to the database survive failures and retain its changes.

Implementations

Standard transaction-processing software, such as IBM's Information Management System, was first developed in the 1960s, and was often closely coupled to particular database management systems. Client–server computing implemented similar principles in the 1980s with mixed success. However, in more recent years, the distributed client–server model has become considerably more difficult to maintain. As the number of transactions grew in response to various online services (especially the Web), a single distributed database was not a practical solution. In addition, most online systems consist of a whole suite of programs operating together, as opposed to a strict client–server model where the single server could handle the transaction processing. Today a number of transaction processing systems are available that work at the inter-program level and which scale to large systems, including mainframes.

One effort is the X/Open Distributed Transaction Processing (DTP) (see also Java Transaction API (JTA). However, proprietary transaction-processing environments such as IBM's CICS are still very popular,[citation needed] although CICS has evolved to include open industry standards as well.

The term extreme transaction processing (XTP) was used to describe transaction processing systems with uncommonly challenging requirements, particularly throughput requirements (transactions per second). Such systems may be implemented via distributed or cluster style architectures. It was used at least by 2011.[2][3]

References

  1. ^ a b Gray, Jim; Reuter, Andreas. "Transaction Processing – Concepts and Techniques (Powerpoint)". Retrieved Nov 12, 2012.
  2. ^ Koen Vanderkimpen and Dirk Deridder. "Going eXtreme for Health Care". Devoxx 2011 presentation. Retrieved March 18, 2017.
  3. ^ Kevin Roebuck (2011). Extreme Transaction Processing. Lightning Source. ISBN 978-1-74304-266-3.

Further reading

  • Gerhard Weikum, Gottfried Vossen, Transactional information systems: theory, algorithms, and the practice of concurrency control and recovery, Morgan Kaufmann, 2002, ISBN 1-55860-508-8
  • Jim Gray, Andreas Reuter, Transaction Processing—Concepts and Techniques, 1993, Morgan Kaufmann, ISBN 1-55860-190-2
  • Philip A. Bernstein, Eric Newcomer, Principles of Transaction Processing, 1997, Morgan Kaufmann, ISBN 1-55860-415-4
  • Ahmed K. Elmagarmid (Editor), Transaction Models for Advanced Database Applications, Morgan-Kaufmann, 1992, ISBN 1-55860-214-3

Read other articles:

Building in California, United StatesMerritt BuildingThe Merritt Building in 2014General informationTypeBuildingAddress761 South BroadwayTown or cityLos Angeles, CaliforniaCountryUnited StatesCoordinates34°02′39″N 118°15′18″W / 34.04406°N 118.25488°W / 34.04406; -118.25488Completed1915ClientHulett C. MerrittOwnerBonnis PropertiesHeight36.27 m (119.0 ft)Technical detailsFloor count9 The Merritt Building is a historic building on the corner of Broad...

 

Not to be confused with Wanted (2008 film). 2009 film directed by Prabhu Deva WantedTheatrical release posterDirected byPrabhu DevaWritten byShiraz AhmedStory byPuri JagannadhBased onPokiri (2006) by Puri JagannadhProduced byBoney KapoorStarringSalman KhanPrakash RajAyesha TakiaMahesh ManjrekarVinod KhannaCinematographyNirav ShahSethu SriramEdited byDilip DeoMusic bySongs:Sajid–WajidBackground Score:Salim–SulaimanProductioncompaniesEros InternationalBSK Network & EntertainmentDistribu...

 

Hôtel de Vendôme Hôtel de Vendôme adalah hotel bintang lima yang terletak di 1 Place Vendôme di arondisemen ke-1 Paris. Didirikan pada tahun 1858, terletak di pintu masuk selatan Place Vendôme, di sudut barat laut persimpangan Rue Saint-Honoré dan Rue Place Vendôme.[1] Catatan ^ Le 1 Place Vendôme à l'Hôtel de Vendôme Pranala luar Cari tahu mengenai Hôtel de Vendôme pada proyek-proyek Wikimedia lainnya: Definisi dan terjemahan dari Wiktionary Gambar dan media dari Common...

Campeonato Mundial de AtletismoJúnior de 2010 Eventos 100 m masc fem 200 m masc fem 400 m masc fem 800 m masc fem 1500 m masc fem 3000 m masc fem 5000 m masc fem 10000 m masc fem 100 m com barreiras masc fem 110 m com barreiras masc fem 400 m com barreiras masc fem 3000 mcom obstáculos masc fem 4x100 m masc fem 4x400 m masc fem Marcha atlética 10 km masc fem Lançamento de disco masc fem Lançamento de martelo masc fem Lançamento de dardo masc fem Salto em distância masc fem Salto triplo...

 

「東銀ビルヂング」とは異なります。 東京銀行協会ビルヂング 東京銀行協会ビルヂング、南西角より。情報用途 オフィス建築主 三菱地所、全国銀行公正取引協議会敷地面積 2,890 m² [1]延床面積 32,575 m² [1]状態 解体階数 地上20階、地下4階[2]高さ 82 m(最高部88.2 m)[3]着工 1991年4月竣工 1993年9月解体 2016年下期所在地 〒100-0005東京都千...

 

У Вікіпедії є статті про інші значення цього терміна: Сава. Сава Місце впадіння Сави у Дунай 46°20′39″ пн. ш. 14°09′19″ сх. д. / 46.34423055558377769° пн. ш. 14.15541111113877726° сх. д. / 46.34423055558377769; 14.15541111113877726Витік • координати 46°20′39″ пн. ш. 14°09′19″ сх. ...

Palau de la Música Catalana und Hospital de la Santa Creu i Sant Pau in Barcelona UNESCO-Welterbe Haupteingang zum Krankenhaus Hospital de la Santa Creu i Sant Pau Vertragsstaat(en): Spanien Spanien Typ: Kultur Kriterien: i, ii, iv Referenz-Nr.: 804 UNESCO-Region: Europa und Nordamerika Geschichte der Einschreibung Einschreibung: 1997  (Sitzung 21) Das Hospital de la Santa Creu i Sant Pau oder kurz Hospital de Sant Pau ist ein Klinikkomplex im katalanischen Jugendstil (Moderni...

 

Church in Nordland, NorwayDønnes ChurchDønnes kirkeView of the church66°12′13″N 12°35′15″E / 66.2037427°N 12.58751517°E / 66.2037427; 12.58751517LocationDønna, NordlandCountryNorwayDenominationChurch of NorwayPrevious denominationCatholic ChurchChurchmanshipEvangelical LutheranHistoryStatusParish churchFounded13th centuryArchitectureFunctional statusActiveArchitectural typeLong churchCompletedc. 1230(793 years ago) (1230)SpecificationsMaterials...

 

For the facility in Fort Worth, Texas, see Masonic Home Independent School District. United States historic placeMasonic Widows and Orphans HomeU.S. National Register of Historic PlacesU.S. Historic district The OlmsteadShow map of KentuckyShow map of the United StatesLocationLouisville, KentuckyCoordinates38°15′16″N 85°40′3″W / 38.25444°N 85.66750°W / 38.25444; -85.66750Built1922ArchitectJoseph and Joseph; Olmsted BrothersArchitectural styleColonial R...

Human settlement in EnglandPainswickPainswick from LongridgePainswickLocation within GloucestershirePopulation3,026 [1]OS grid referenceSO866098Civil parishPainswickDistrictStroudShire countyGloucestershireRegionSouth WestCountryEnglandSovereign stateUnited KingdomPost townStroudPostcode districtGL6Dialling code01452PoliceGloucestershireFireGloucestershireAmbulanceSouth Western UK ParliamentStroud List of places UK England Gloucestershire 51°47...

 

This article is about the sculptor. For other person with a similar name, see Nandagopal. Indian sculptor and painter, (1946 – 2017) S. NandagopalBorn1946 (1946)Bengaluru, Karnataka, IndiaDied2017 (aged 70–71)Cholamandal Artists' Village, Tamil NaduAlma materLoyola College, ChennaiGovernment College of Fine Arts, ChennaiKnown forSculptures in metalMovementMadras Art MovementSpouseKalaAwards1970 Lalit Kala Akademi Award1978 Lalit Kala Akademi Award2002...

 

Qatari footballer This biography of a living person needs additional citations for verification. Please help by adding reliable sources. Contentious material about living persons that is unsourced or poorly sourced must be removed immediately from the article and its talk page, especially if potentially libelous.Find sources: Khalfan Ibrahim – news · newspapers · books · scholar · JSTOR (August 2015) (Learn how and when to remove this template message)...

2018 action film directed by N. Lingusamy Sandakozhi 2Theatrical release posterDirected byN LingusamyWritten byBrindha SarathiS. Ramakrishnan(Dialogues)Story byN LingusamyProduced byVishalDhaval Jayantilal GadaAkshay Jayantilal GadaStarringVishalKeerthy SureshVaralaxmi SarathkumarRajkiranCinematographyK. A. SakthivelEdited byPraveen K. L.Music byYuvan Shankar RajaProductioncompaniesVishal Film FactoryPen StudiosDistributed byLyca ProductionsScreen SceneRelease date 18 October 2018&#...

 

You can help expand this article with text translated from the corresponding article in Russian. (February 2021) Click [show] for important translation instructions. View a machine-translated version of the Russian article. Machine translation, like DeepL or Google Translate, is a useful starting point for translations, but translators must revise errors as necessary and confirm that the translation is accurate, rather than simply copy-pasting machine-translated text into the English Wik...

 

Tunisian politician (1873–1947) This article includes a list of general references, but it lacks sufficient corresponding inline citations. Please help to improve this article by introducing more precise citations. (May 2018) (Learn how and when to remove this template message) Abdeljelil Zaoucheعبد الجليل الزّاوشBorn(1873-12-15)15 December 1873La Marsa, Beylik of TunisDied3 January 1947(1947-01-03) (aged 73)Tunis, French protectorate of TunisiaOccupationPolitician Abde...

Discontinued mobile operating system by Microsoft Windows Mobile 6.0Version of the Windows Mobile operating systemDeveloperMicrosoft CorporationWorking stateDiscontinuedSource modelClosed sourceReleased tomanufacturingFebruary 12, 2007; 16 years ago (2007-02-12)Kernel typeWindows CEPreceded byWindows Mobile 5.0Succeeded byWindows Mobile 6.1Support statusUnsupported as of January 8, 2013[1] Windows Mobile 6, formerly codenamed Crossbow,[2] was the version of W...

 

6th-century Arab chieftain and poet For other uses, see Hatimtai. Hatim Al-Tayyi (left) depicted in an Urdu Diwan Hatim Tai redirects here. For the films, see Hatim Tai (1956 film) and Haatim Tai (1990 film). Hatim al-Tai (Arabic: حاتم الطائي, 'Hatim of the Tayy tribe'; died 578), full name Ḥātim bin ʿAbd Allāh bin Saʿd aṭ-Ṭāʾiyy (Arabic: حاتم بن عبد الله بن سعد الطائي) was an Arab chieftain of the Tayyi tribe of Arabia, ruler of Shammar, and poet...

 

Italian middle-distance runner (1963–2020) Donato SabiaPersonal informationNational teamItaly: 17 caps (1982-1988)[1]Born(1963-09-11)11 September 1963Potenza, ItalyDied7 April 2020(2020-04-07) (aged 56)Potenza, ItalyHeight1.78 m (5 ft 10 in)Weight65 kg (143 lb)SportSportAthleticsEvent(s)400 metres800 metresClubPro Patria MilanoAchievements and titlesPersonal bests 400 m: 45.73 (1984) 800 m: 1:43.88 (1984) Medal record Event 1st 2nd 3rd European Ind...

Masherbrum Vista del Masherbrum (julio de 2004)Localización geográficaCordillera KarakórumCoordenadas 35°38′33″N 76°18′39″E / 35.6425, 76.310833333333Localización administrativaPaís Gilgit-Baltistán Pakistán PakistánDivisión Ghanche DistrictCaracterísticas generalesAltitud 7.821 m (24ª del mundo)Prominencia 2.457 mMontañismo1.ª ascensión 1960George Bell y Willi UnsoeldRuta Arista sureste: Glaciar/nieve/escalada en hieloMapa de localización Masherb...

 

For other people with the same name, see Mustafa Kamal (disambiguation). Mostafa Kamal Tolbaمصطفى كمال طلبةDr. Mostafa TolbaPresident of the Egyptian Olympic CommitteeIn office1971–1972Preceded byMuhammad Abu el-EzzSucceeded byAbdel Moneim Wahbi Hussein2nd Executive Director of United Nations Environment ProgrammeIn office1975–1992Preceded byMaurice StrongSucceeded byElizabeth Dowdeswell Personal detailsProfessionDoctor Mostafa Kamal Tolba (Arabic: مصطفى كمال طلب...

 

Strategi Solo vs Squad di Free Fire: Cara Menang Mudah!