Kbase P37668: Is the ROWID stored in the same place as the RECID was in earlier versions.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/12/2009 |
|
Status: Verified
GOAL:
Is the ROWID stored in the same place as the RECID was in earlier versions.
FACT(s) (Environment):
Progress 8.x
Progress 9.x
OpenEdge Category: Database
FIX:
For Progress 4GL databases, the row identifiers; RECIDs and ROWIDs are functionally equivalent but are different data types. They are unique row identifiers in the database in version 8 and unique to an area in version 9.
A RECID is essentially a 32-bit positive integer. It represents the encoding of the storage address for a record within a Progress database storage area.
A ROWID is a variable-length byte string whose semantics and length vary depending on the database type. For Progress databases, its meaning is the same as RECID. For the PROGRESS Oracle DataServer, it is a representation of the Oracle ROWID.
The RECID is stored in the beginning of each data block. Within the data block header we find the dbkey which represents the block number. In the first part of the block after the header, the offset of each record in the block will be listed.
Thus, the RECID is the combination of the dbkey and the record offset within the block.
As each record is added it must be placed in an available slot in some block, thus the association to a RECID is established.
When an index is added to a table, Progress automatically adds the row identifier as a component to the index. Even when no index is added to a table, Progress automatically creates a default primary index with the row identifier as its component.
At the leaf level of the B-Tree for indexes you have KEY/ROWID values. In the retrieval of a record you find the record using the index and retrieve it using the associated ROWID.