INTRODUCTION:
=============This article provides a better understanding of RECIDs and ROWIDs in the PROGRESS environment.
WHY YOU NEED TO KNOW THIS:
===========================This article simply attempts to list facts about RECIDs (and by extension ROWIDs) in order that they may assist with resolving errors which you may be receiving. At minimum, this article aims to increase one's technical understanding of RECIDs/ROWIDs and how to work with them.
RECID FACTS:
- A RECID is a unique identifier for a record in a table within a Progress Database. In older versions (in Type 1 databases) no two records in a database could have the same RECID. This may not be true for other database managers.
NOTE: Due to storage enhancements in Progress 9.x, specifically, storage areas, this fact changes. In Progress 9.x uniqueness of a RECID applies to storage areas, and since a table can only be in one storage area its RECIDs are also unique within a table. That is, no two records in a table can have the same RECID, however, records in different tables may have the same RECID.
- RECIDs are a permanent feature of a record. A record's RECID never changes during the lifetime of the record.
- RECIDs are recycled. When a record is deleted, after the deleting transaction has been committed, another transaction can create a new record with the same recid that was previously used for a different record.
- A RECID is an encoding of the physical location of a record in an OpenEdge database. It can be used to locate a record without using an index.
- RECIDs can be 32 or 64 bit integers. RECID can be converted to INTEGER/INT64 and back.
- The RECID data-type is too small to hold Oracle ROWID values and similar constructs in other data managers.
ADDITIONAL RELATED INFORMATION
=======================ROWID FACTS:
- A ROWID is a unique identifier for a record in a table within a Progress Database. In older versions (in Type 1 databases) no two records in a database could have the same ROWID. This may not be true for other database managers.
NOTE: Due to storage enhancements in Progress 9.x, specifically, storage areas, this fact changes. In Progress 9.x, uniqueness of a ROWID only applies to storage areas, and since a table can only be in one storage area, its ROWIDs are also unique within a table, that is, a ROWID is a unique identifier for a record in a table. No two records in the same table can have the same ROWID.
- In other database managers (DataServer), ROWIDs map to whatever the other data manager uses. This means they may not be unique.
- In Progress databases, ROWIDs are mostly permanent, except for when the table is part of a Table Partitioning policy. Without Table Partitioning, the record's ROWID never changes during its lifetime. This may or may not be true for other database managers.
- In current Progress releases (as of 4/2017), ROWIDs do the same thing as RECIDs.
- ROWIDs were introduced in Progress version 8.0.
- ROWIDs are not INTEGERs. They are variable length binary strings. ROWIDs cannot be converted to integers, except by chicanery (4GL. How to convert a ROWID to a RECID and Vice Versa).
- Although they are similar, ROWIDs and RECIDs are not interchangeable in 4GL/ABL code if they are converted to integers or when displaying them.
- For new code, use ROWIDs wherever possible instead of RECID.