A method and apparatus generates identifiers of database records apart
from the database. One or more application programs may request an
identifier of a transaction, and a stored identifier of a prior
transaction is incremented or otherwise altered to produce the identifier
of the transaction. The identifier is provided to the application
program, which uses it as an identifier of a record of a database if such
a record is created. If a system failure occurs, the database is scanned
to identify the most recently issued identifier stored in the database,
for example by requesting from the database the highest transaction
number stored, and that number is used to generate the next transaction
number.