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 -> Re: serial data type

Re: serial data type

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/08/30
Message-ID: <340a7b00.22738836@newshost>#1/1

On 29 Aug 1997 16:53:01 -0700, kfein_at_primenet.com (KE Fein) wrote:

>tkyte_at_us.oracle.com (Thomas Kyte) wrote:
>>
>>Wait a minute, a rowid for a row will *never* repeat *never* change.
>>
>>If you delete a row and reinsert it, as far as anyone is concerned it
>>is simply NOT the same row.
>>
>>A rowid for a row will never change.
>>
>[snip]
>I am no Oracle expert, nor an Oracle employee, but as part of my Oracle DBA
>training I was shown in class how a row in a table can migrate within the block
>and datafile subsequent to update statements. I think it would be misleading
>to say that that constitues a new row. Comments?
>

when a row is migrated, the original rowid is preserved.

When we migrate a row, we leave a pointer in the original location to the new location. the old rowid is still valid, the 'new' rowid is only visible in the place where the data used to be (no one ever sees the 'new rowid').

Migrated rows do not cause the rowid to change. Nothing will cause a rowid to change. A rowid is assigned to a row upon insertion into the database. Until you delete that row, it will have that rowid.

Read only- refresh fast snapshots would not have a chance at all of working if rowids ever changed. These snapshots rely on a snapshot log which is just of list of rowids that have changed and what operation was performed on them (Insert/Update/Delete). If rowids changed, snapshot based replication wouldn't work. (and here is a good example of using a rowid not just within a session but across sessions).

>
> \\///
> (0-0)
> +----oOO----(_)-----------+
> | K. E. Fein |
> | Database Analyst |
> | kfein_at_primenet.com |
> +------------------oOO----+
> | | |
> |__|__|
> || ||
> ooO Ooo

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD

http://govt.us.oracle.com/ -- downloadable utilities



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Sat Aug 30 1997 - 00:00:00 CDT

Original text of this message

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