Timestamp procedure

from Wikipedia, the free encyclopedia

Timestamp method ( English timestamp ordering ) are in database systems used to the demand of the insulation of the ACID -Prinzips when transactions meet.

Time stamping methods fall into the category of optimistic synchronization methods , which means that when a transaction is started it is assumed that the probability of a conflict with a parallel transaction (TA) is low.

Transactions are only rolled back if a conflict has or might have occurred.

In order to be able to recognize the conflicts, transactions and objects are given time stamps. Now, before each read or write access to an object, it can be checked whether the object has already been changed by a TA running in parallel, i.e. whether a conflict has arisen, otherwise the time stamp can be updated.

In practical applications, a validation does not take place before every access to an object, but the changes to a transaction are initially in a buffer, so that the actual entry into the database (writing to hard disk) only after a successful validation phase (before the commit , the writing process) is performed.

Basic validation techniques

For each transaction, the database system maintains a read set (number of objects that the TA has read) and a write set (number of objects that have been written by the TA). There is a conflict between two transactions if the write and read set of the transactions contain the same objects.

One differentiates:

BOCC (backward-oriented optimistic concurrency control)
Backward validation: When a TA is terminated, all transactions that have successfully validated during the execution of the TA are checked; in the event of a conflict, the validating TA is reset.
FOCC (forward-oriented optimistic concurrency control)
Forward validation: When a TA ends, all ongoing transactions are checked. In the event of a conflict, the ongoing transactions are reset (“kill” approach), or the validating TA is reset (“die” approach).

See also