Introduction to Data Management
7 Ensuring Database
Consistency With TMF
15873 Tandem Computers Incorporated 7-1
To be truly effective, a fault tolerant OLTP system must guarantee database
consistency; the system must ensure that the data in your database always
corresponds to the real world that the database is intended to reflect.
A database is consistent when it satisfies particular criteria that you establish for the
relationship between items in the database. As an example, one criterion for a
banking application is that an account balance must always equal the credits minus
the debits for that account.
When an application changes a database, it transforms the database from one
consistent state to another. During the transformation process, however, the database
passes through a phase where it is temporarily inconsistent. For instance, the banking
application really conducts two operations when it balances an account: a debit
operation and a credit operation. After debiting, but before crediting takes place, the
database is not consistent. At this moment, the application views an inconsistent
database that presents an invalid picture of the real world. Only when the crediting
function is complete does the database become consistent again, presenting an
accurate account balance to all accessing applications.
In an active, demanding OLTP environment, with many applications concurrently
updating hundreds of records, database consistency becomes a crucial concern. To
help ensure this consistency, the Transaction Monitoring Facility (TMF) is available to
protect your database against the effects of:
Transaction failures, where an individual transaction terminates before all requested
changes are recorded in the database; when a transaction fails, TMF automatically
withdraws all database updates affected by the transaction
System failures, where system shutdown due to power outages or multiple
hardware failures destroys data in the database; when the failure is corrected and
the system returns to operation, TMF uses previously recorded data to restore the
database automatically
Media failures, where a catastrophic disk drive failure destroys data in the database;
following this kind of failure, TMF allows you to use previous database backups
and recorded data to recreate the database
Concurrent access, where more than one transaction attempts to access the same
data; by dynamically locking and unlocking affected records, TMF ensures that
only one transaction at a time accesses those records
TMF can monitor thousands of transactions sent from hundreds of terminals across
multiple processors to your database. TMF provides this protection by supplying all
the necessary code for you.