Skip to content
← Back to glossary

トランザクションTransaction

Learn in the textbookTransaction Fundamentals and Concurrency Control

DefinitionA transaction (トランザクション) is a unit of processing that groups several related updates and ends in one of two ways: all of them take effect, or none do.

ExplanationThe operation that makes updates final once every grouped step has finished normally is a commit (コミット), and undoing the updates after a failure partway through so the data returns to its starting state is a rollback (ロールバック). To be able to undo, the DBMS records the history of updates in a file called the log (ログ). When several users reach the same data at the same moment the results can conflict, so the DBMS applies exclusive control (排他制御): it places a lock (ロック) on data in use and makes other processes wait.

AnalogyIt is like a package holiday where the flight and the hotel can only be booked together. If the hotel is full, the flight is not booked either; the booking stands only once both are secured.

Memory hookIn everyday English a transaction is a deal, and a deal only counts when the goods change hands and the payment is made, both together.

Related past-exam questions(22 questions)