Re: Using rowid in a html anchor / select statement

From: Hans Forbrich <forbrich_at_tibalt.supernet.ab.ca>
Date: 1996/10/01
Message-ID: <3251E889.1410_at_tibalt.supernet.ab.ca>#1/1


Thomas J. Kyte wrote:

> Rowid will never change and is *very* useful in html pages for identifying a
> row.
>
> True, before insert, a rowid doesn't exist and after a delete it is meaningless
> (but I can surely say the same exact thing about a primary key. before insert--
> meaningless. after delete-- meaningless).
>
> Rowids exist with the row for as long as the row exists. You must delete and
> then re-insert a row to get a different rowid. Oracle Forms is completely
> reliant on the rowid and would completely fail if it changed. Oracle basic
> replication (r/o snapshots) is completely dependent on rowid and would fail if
> it changed. Oracle indexes are completely dependent on rowid and would fail if
> it changed (we only update an index entry if you modify the indexed values, we
> would have to modify an index all the times if the rowid could change (but it
> can't))
>
> I like to pass rowids from screen to screen (form to form) cause:
>
> - they are always one column, primary keys can be many columns
>
> - they never contain special html characters like <, >, &, ", ' ', /, etc
> (things that can't be in a url)
>
> - they are the fastest way to get the row back again.
>
> - They are great for implementing drill down.
>
> Here are some quotes from the doc's on the subject:
>
> <quote>
> If a row in a data block is updated so that the overall row lengthincreases and
> the block’s free space has been completely filled, the datafor the entire row is
> migrated to a new data block, assuming the entirerow can fit in a new block.
> Oracle preserves the original row piece of amigrated row to point to the new
> block containing the migrated row; the ROWID of a migrated row does not change.
> </quote>
>
> <quote>
> The ROWID identifies each row piece by its location or address. Onceassigned, a
> given row piece retains its ROWID until the correspondingrow is deleted, or
> exported and imported using the IMPORT andEXPORT utilities. If the cluster key
> values of a row change, the rowkeeps the same ROWID, but also gets an additional
> pointer ROWID forthe new values.
>
> Because ROWIDs are constant for the lifetime of a row piece, it isuseful to
> reference ROWIDs in SQL statements such as SELECT, UPDATE, and DELETE. See
> “ROWIDs and the ROWID Datatype” onpage 6–9.
> </quote>
>
> <quote>
> A row’s assigned ROWID remains unchanged unless the row isexported and imported
> (using the IMPORT and EXPORT utilities). When you delete a row from a table (and
> then commit theencompassing transaction), the deleted row’s associated ROWID can
> beassigned to a row inserted in a subsequent transaction.
> </quote>
>
> Thomas Kyte
> Oracle Government
> tkyte_at_us.oracle.com
>

Thomas,

Apologies for my incorrect statement. Either I learned it wrong or there have been significant changes since I learned it back in Oracle v4/v5 days.

/Hans Received on Tue Oct 01 1996 - 00:00:00 CEST

Original text of this message