There are two major aspects to transaction processing: atomicity and automatic recovery. These are related yet different aspects to transaction processing, and not all database products supply both as FairCom does. Both are discussed in detail in Data Integrity. Atomicity involves ensuring that if any elements are committed that all elements of the transaction are committed. Automatic recovery ensures that any committed updates will be made to the data and index files even in the event of a system crash.
FairCom provides a set of functions and file modes that cover both aspects of transaction processing. This allows you to specify the type of transaction processing used on a file-by-file basis in one of three modes:
The transaction processing API functions work with the file modes to complete the process:
Function |
Description |
---|---|
Begin() |
Begins the transaction. All updates are tracked from this point. |
Commit() |
Ends the transaction and posts all updates to the files. |
Abort() and AbortXtd() |
Ends the transaction without posting updates to the files. |
SetSavePoint() |
Establishes a drop back position (savepoint) within a transaction. |
RestoreSavePoint() |
Drops back to the last savepoint without aborting the transaction, |
For more information of transaction processing, see Data Integrity.