Schema DDL Types of access
U929-J-Z125-9-76 85
Dokuschablonen 19x24 Version 7.3us für FrameMaker V7.x vom 14.02.2007 © cognitas GmbH 2001-2007 24. Oktober 2007 Stand 09:30.23 Pfad: G:\vogt\fsc\ud s\Manuale\en\udsent_e\uds ent.k04
4.7.1 Direct and sequential access on record type level via database key value
The database key value is a unique internal record key assigned at the time a record is
stored, and retained for the entire life of the record.
The database key value is a combination of the record type identifier, the record reference
number and a record sequence number (see the section “St ructure of a database key value”
on page 132). The order of records within a record type is accor ding to ascending record
sequence numbers.
For each record type, UDS/SQL automatically generates a table, the Database Key Trans-
lation Table (DBTT), which contains the physical addresses (page numbers) of all records
of one record type (see section “DBTT (Database Key Translation Table)” on page 131).
UDS/SQL obtains the physical address of a record in the DBTT by converting the record’s
database key value; it does not have to sequentially scan the DBTT.
Thus the database key represents a means of directly and sequentiall y accessing data on
record type level.
As a standard feature, the database key values are assigned by UDS/SQL. In this case, the
order of records is not usually predictable when sequential proce ssing is applied:
If the database programmer stores the database key values, he or she can determine th e
order in which the records are stored. This requires the following provisions:
Assignment of database key values by the user
IN
DIRECT ⎫ item-name record-name
LOCATION MODE IS OF
DIRECT-LONG
identi fier
If this clause is specified, the database programmer is not on ly enabled to determine the
order of the records, but it is also possible to select any associated set occurrenc es more
conveniently (see the section “Determining set occurrence selection” on page 103). If you
specify this clause, you cannot insert any new records of the sp ecified record type with
SQL.
item-name specifies an item which can contain database key values. It is at the same time
defined as a key item for direct access.
If LOCATION MODE IS DIRECT is specified, item-name must be defined as a DATABASE-
KEY item.