Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> The formats of ROWID's

The formats of ROWID's

From: Dino Hsu <dino1_at_ms1.hinet.net>
Date: Sun, 12 Aug 2001 18:48:29 +0800
Message-ID: <lqmcnt0luf28g6i81cd3cif0m2p1gtsfs2@4ax.com>

Dear all,

Quoting a book:
"... In Oracle 8i, ROWID data needs 80 bits (10 bytes) for storage. Oracle 8i ROWIDs consist of four components: and object number (32 bits), a relative file number (10 bits), a block number (22 bits), and a row number (16 bits). Oracle 8i ROWIDs are displayed as 18-character representations of the location of data in the database, with each character represented in a base-64 format consisting of A-Z, a-z, +, and /. The first six characters correspond to the data object number, the next two are the relative file number, the next five are the block number, and the last three are the row number..."

As a summary:
object: 32 bits, 6 characters
file: 10 bits, 2 characters
block: 22 bits, 5 characters?
row: 16 bits, 3 characters

A base-64 digit (or character) can accomodate 6 bits, why does the 22-bit block need 5 characters while only 4 is enough? Besides, 6+2+5+3=16 not 18.

On the other hand, in Chapter 12 Built-in data types of <<Concepts>>, the number of characters for object, file, block, row are 6, 3, 6, 3 respectively without mentioning the bits.

Anyone comment on this? Thanks in advance.

Dino Received on Sun Aug 12 2001 - 05:48:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US