Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX -
|
Contents
Index

|
5.1.1 What is a Transaction?
A transaction is the smallest unit of work that has a meaning with respect to business rules. It cannot be further factored or broken down.
This section uses the example of participation in educational courses to explain transactions.
Assume that to attend the course, it is necessary to update the following two XML documents:
- An XML document for managing course information (the student capacity of the course, the number of individuals who have been enrolled, etc.)
- An XML document for managing student information (the course attended by each student, etc.)
XML Document for Managing Course Information
<course>
<name>Business negotiation</name>
<instructor>
<first-name>Max</first-name>
<last-name>cameron</last-name>
</instructor>
.
.
.
<capacity>40</capacity>
<current-auditors>30</current-auditors>
.
.
.
</course>
<course>
.
.
. |
XML Document for Managing Student Information
<student>
<first-name>Jack</first-name>
<last-name>Wilson</last-name>
<e-mail>jack.wilson@abc.com</e-mail>
<course>Japanese language</course>
.
.
.
<course>Business negotiation</course>
.
.
.
</student>
<student>
<first-name>Mary</first-name>
<last-name>Tompson</last-name>
<e-mail>mary.tompson@def.com</e-mail>
<course>Chinese language</course>
.
.
.
</student>
<student>
.
.
. |
At this point, let us assume that the update process associated with Mary Thompson's application to attend a course in business negotiation techniques is performed. The resulting XML documents are as follows:
XML Document for Managing Course Information
<course>
<name>Business negotiation</name>
<instructor>
<first-name>Max</first-name>
<last-name>cameron</last-name>
</instructor>
.
.
.
<capacity>40</capacity>
<current-auditors>31</current-auditors>
.
.
.
</course>
<course>
.
.
. |
XML Document for Managing Student Information
<student>
<first-name>Jack</first-name>
<last-name>Wilson</last-name>
<e-mail>jack.wilson@abc.com</e-mail>
<course>Japanese language</course>
.
.
.
<course>Business negotiation</course>
.
.
.
</student>
<student>
<first-name>Mary</first-name>
<last-name>Tompson</last-name>
<e-mail>mary.tompson@def.com</e-mail>
<course>Chinese language</course>
.
.
.
<course>Business negotiation</course>
.
.
.
</student>
<student>
.
.
. |
In this example, the information that Mary is attending the course in business negotiation techniques is added to Mary's student information, and the number of course participants in the business negotiation techniques course information is increased. These two data manipulations only have meaning as a pair; either manipulation on its own will not be a correct representation of the actual situation. If either data manipulation fails, the data will become logically inconsistent.
Transactions are used in situations such as these. Shunsaku transactions are made up of a series of data changes. Shunsaku ensures that the data changes making up the transaction are either all valid or else all invalid. In short, by making a meaningful series of data manipulations a single transaction, it becomes possible to maintain the logical consistency of the data.
All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006