Consultor Eletrônico



Kbase 17076: FAQ: Recid and Rowid
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   22/12/2005
Status: Verified

GOAL:

What are RECID and ROWID?

FIX:

INTRODUCTION:
=============
This Solution is intended to provide a better understanding of RECID's in the PROGRESS environment.


WHY YOU NEED TO KNOW THIS:
===========================
This article simply attempts to list facts about recid's (and by extension rowid's) 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 recid's/rowid's and how they function.

RECID FACTS:

1. A recid is a unique identifier for a record in a Progress Database. No two records in a database can have the same recid. This may not be true for other data 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, the 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.

2. Recid's are permanent. A record's recid never changes during the lifetime of the record.

3. Recid's 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.

4. A recid is an encoding of the physical location of a record in a Progress database. It can be used to locate a record without using an index.

5. Recid's are 32 bit integers. Recid's can be converted to integers and vice versa.

6. Recid's are too small to hold Oracle rowid values and similar constructs in other data managers.

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

ROWID FACTS:

1. In a Progress database, a rowid is a unique identifier for a record in a database. No two records can have the same rowid.

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, the 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.

2. In other datasources, rowid's map to whatever the other data manager uses. They may not be unique.

3. In Progress databases, rowid's are permanent. A record's rowid never changes during the lifetime of a record. This may or may not be true for other data managers.

4. In current Progress releases (as of 7/97), rowid's do the same thing as recid's.

5. Rowid's were introduced in Progress version 8.0.

6. Rowid's are not integers. They are variable length binary strings. Rowid's cannot be converted to integers, except by chicanery.

7. In the future, rowid's will not be unique to a database. They will be unique to a table though. No two records in the same table will have the same rowid.

8. We *may* replace all the recid's in the Progress schema with rowid's in the future. This has not been decided (as of 7/97).

9. Although they are similar, rowid's and recid's are not interchangeable in 4gl code if they are converted to integers or when displaying them.

10. For new code, use rowid's wherever possible.