Introduction to TRANSFER Delivery System
TMF—Transaction Monitoring for Database
Consistency
The TRANSFER Delivery System
1-16 109426—Introduction to TRANSFER Delivery System
TMF—Transaction Monitoring for Database Consistency
TMF lets an application ensure the consistency of a database, even if there is a hardware
or software failure or a system crash. TMF also protects the consistency of data by
allowing only one transaction, from one application, to modify particular data at one
time.
Consistency becomes an issue when a transaction attempts to make multiple changes in
a database. For example, a transaction to transfer funds from one account to another
affects two accounts; the amount to transfer is debited from one account and credited to
another. If a failure occurs between the debit update and the credit update to the
database, the database will be inconsistent.
Consistency is also a problem if multiple processes make changes in a database at the
same time. Figure 1-8 shows how concurrent access to a database can make the
database inconsistent.
With TMF, the programmer divides an application into TMF transactions. A TMF
transaction is a series of related actions; either all actions must occur or none must occur
for the database to be consistent. In the example given in Figure 1-8, the debit and the
credit would be part of the same transaction. A failure between the debit and the credit
would cause the entire transaction to be backed out; the debit would never really occur.
During any TMF transaction, the affected records are locked and made inaccessible to
other processes, thus preventing inconsistencies due to concurrent access.
You must have TMF configured before you use TRANSFER.
Figure 1-8. Inconsistency with Concurrent Access
Transaction 2
Reads Balance of $200
•
•
•
•
Balance = $200 - $50
•
•
•
•
Writes Balance of $150
Transaction 1
Reads Balance of $200
•
•
Balance = $200 + $100
•
•
•
Writes Balance of $300
Balance
$200
Balance
$300
Balance
$150
S8123-008