Introduction to Data Management
Ensuring Database Consistency With TMF
7-4 15873 Tandem Computers Incorporated
Figure 7-2. TMF Audit Trails
S8020-022
CHANGE RECORDS
.
.
.
CHANGE RECORDS
.
.
.
CHANGE RECORDS
.
.
.
Server
R2
R3R1
R2
R3R1
Before-images and
after-images of
records R1, R2, and R3
Status information
(in monitor or master
audit trail)
Audit
Trails
Database Files
R2
R3R1
In the audit trail, the before-image shows the value of each field before the update,
while the after-image shows the value of each field following the update. TMF uses
the before-images to back out the changed information if a transaction fails. TMF uses
the after-images to reapply successful transactions to the database during recovery
from a system or disk failure, as discussed later in this section.
PATHWAY Environment Support
TMF provides a natural extension of the PATHWAY programming environment by
relating the idea of a database transaction to the code you supply in your application.
Thus, when you are writing a screen program to be run by a PATHWAY TCP, you
delimit the beginning and end of each transaction with two simple SCREEN COBOL
statements: BEGIN-TRANSACTION and END-TRANSACTION. These two
statements appear in the code shown in Figure 7-3.