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: Bookish Questions need Ideas

Re: Bookish Questions need Ideas

From: Arijit Chatterjee <arijitchatterjee123_at_yahoo.co.in>
Date: 1 Oct 2004 02:36:13 -0700
Message-ID: <ea01504d.0410010136.7ed30d95@posting.google.com>


Thanks Sir,
Thanks for your reply.I got your points.But one thing is there. I am explaining through an example



Table1
|----------|--------------|
|Col1 |Col2 |
|----------|--------------|
|1 |A |
|----------|--------------|
|2 |B |
|----------'--------------|
|... 100 records |
'-------------------------'

Step1: Now I am updating the table



Update table Table1 set col1=col1+1

So before Commit


Rollback Segment Stores
|----------|--------------|
|Col1 |Col2 |
|----------|--------------|
|1 |A |
|----------|--------------|
|2 |B |
|----------'--------------|
|... 100 records |

'-------------------------'

Database Table Store
|----------|--------------|
|Col1 |Col2 |
|----------|--------------|
|2 |A |
|----------|--------------|
|3 |B |
|----------'--------------|
|... 100 records |
'-------------------------'

Whenever any user asking for any record
he/she is getting for Rollback segment.

After Commit


Database Table Remains
But Users are now getting data from
Database table only.
|----------|--------------|
|Col1 |Col2 |
|----------|--------------|
|2 |A |
|----------|--------------|
|3 |B |
|----------'--------------|
|... 100 records |

'-------------------------'

But
Rollback Segment remain storing
these records or releasing this.
|----------|--------------|
|Col1 |Col2 |
|----------|--------------|
|1 |A |
|----------|--------------|
|2 |B |
|----------'--------------|
|... 100 records |

'-------------------------'
==================================

As per above scenario
Q1.If rollback segment releasing then fine if not then why it is storing it because we can take the information from Redo Logs only.And user and do any undo operation.


RedoLog is storing

New information + Date

|----------|--------------|
|Col1 |Col2 |
|----------|--------------|
|2 |A |
|----------|--------------|
|3 |B |
|----------'--------------|
|... 100 records |

'-------------------------'

as well as previous information
with the date because I can take
retrive my previous data through
Redo Logs.

Old Information + Date
|----------|--------------|
|Col1 |Col2 |
|----------|--------------|
|1 |A |
|----------|--------------|
|2 |B |
|----------'--------------|
|... 100 records |
'-------------------------'
=========================================
Q2.Why Oracle immediately updates tables in original database and keep the data in rollback segments.As a little programmer's point of view if it store the data temporarily in Rollback segment and after "commiting" it updates that orginal database what is the low sound in this concept.Because oracle is used for robust data storage.why it is making the prototype of huge data in Rollback segments.

On the above expample if I am wrong any where please guide me.Thanks once again for your great guidances.
Regards
Arijit Chatterjee Received on Fri Oct 01 2004 - 04:36:13 CDT

Original text of this message

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