Salesforce

FAQ: Recid and Rowid

« Go Back

Information

 
TitleFAQ: Recid and Rowid
URL Name17076
Article Number000148733
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version: 10.x, 11.x, 12.x
OS: All supported platforms
Question/Problem Description
What are RECID and ROWID?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
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:
  1. 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.
  1. RECIDs are a permanent feature of a record. A record's RECID never changes during the lifetime of the record.
  2. 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.
  3. 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.
  4. RECIDs can be 32 or 64 bit integers. RECID can be converted to INTEGER/INT64 and back.
  5. The RECID data-type is too small to hold Oracle ROWID values and similar constructs in other data managers.

ADDITIONAL RELATED INFORMATION
=======================


ROWID FACTS:
  1. 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.
 
  1. In other database managers (DataServer), ROWIDs map to whatever the other data manager uses.  This means they may not be unique.
  2. 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.
  3. In current Progress releases (as of 4/2017), ROWIDs do the same thing as RECIDs.
  4. ROWIDs were introduced in Progress version 8.0.
  5. 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).
  6. Although they are similar, ROWIDs and RECIDs are not interchangeable in 4GL/ABL code if they are converted to integers or when displaying them.
  7. For new code, use ROWIDs wherever possible instead of RECID.
Workaround
Notes
The distinction between recid and rowid made here only applies in 4GL/ABL. In Progress/OpenEdge SQL, the value returned by the ROWID function is the one referred to here as recid. When using the getValue() function in a stored procedure or trigger, it should be retrieved as an INTEGER into a Java Integer object. The value referred to here as rowid is not used in Progress/OpenEdge SQL.

References to other documentation:

Progress Article(s):
4GL. How to convert a ROWID to a RECID and Vice Versa
Row Identifiers, RECID and ROWID Explained
 
Keyword Phrase
Last Modified Date12/23/2020 4:37 PM

Powered by