Rowid
and Rid in DB2
In
our previous tip, you saw that the Rowid datatype can be used to create a column
on a DB2 Table. You may have also heard your DBA refer to a DB2 Rid and wondered
if they're the same thing. Though they may conceptually be considered similar,
they are in fact different things. A Rowid is used to create a column with a
direct pointer to a row using the Rowid datatype, whereas the Rid is a DB2 internal
record ID that is a 4-byte identifier showing the offset within a page where
a row can be found (this is 5 bytes for partitioned tablespaces). Rids are used
internally in DB2 structures such as the DB2 log.