Google Answers Logo
View Question
 
Q: Database 3 ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Database 3
Category: Computers
Asked by: eksolutions-ga
List Price: $10.00
Posted: 04 Dec 2002 14:14 PST
Expires: 03 Jan 2003 14:14 PST
Question ID: 119316
Consider the execution shown in the figure below.

a.	Extend the figure to show prevLSN and undonextLSN values.
b.	Describe the actions taken to rollback transaction T2.
c.	Show the log after T2 is rolled back, including all prevLSN and
undonextLSN values in log records.

 

LSN                  LOG

00                     update: T1 writes P2

10                     update: T1 writes P1

20                     update: T2 writes P5

30                     update: T3 writes P3

40                     T3 commit

50                     update: T2 writes P5

60                    update: T2 writes P3

70                     T2 abort
Answer  
Subject: Re: Database 3
Answered By: maniac-ga on 04 Dec 2002 18:11 PST
Rated:5 out of 5 stars
 
Hello Eksolutions,

In general, the "UndoNextLSN" field applies to the CLR records only so
I won't show them for the first 8 entries (00 through 70). The PrevLSN
refers to the previous entry by the same task (e.g., T1 to T1).

LSN  PrevLSN  Log
00   none     update: T1 writes P2
10   00       update: T1 writes P1
20   none     update: T2 writes P5
30   none     update: T3 writes P3
40   30       T3 commit
50   20       update: T2 writes P5
60   50       update: T2 writes P3
70   60       abort T2
----

At this point, there are three steps to be undone 60, 50, and 20 (in
the reverse order of application). Search backwards to find the last
step w/ T2 - LSN=60. The UndoNextLSN (UNLSN) for the first
Compensation Log Record comes from the PrevLSN of LSN 60. (repeat
until complete)
LSN  PrevLSN  UNLSN  Log
80   70       50     clr: T2 undo P3
90   80       20     clr: T2 undo P5
100  90       none   clr: T2 undo P5
110  100             end: T2

The primary reference for this answer is the same as the Database 4
answer
  http://www.cs.colorado.edu/~rick/Classes/3287/Lectures/lec8_bw.pdf
Pages 15 and 16 have the most relevant material.

Note the slight difference in terminology. According to the reference,
there should also have been an end transaction after the T3 commit - I
can't be sure if the answer you are expecting to use needs the "110
... end" I provided.
  --Maniac
eksolutions-ga rated this answer:5 out of 5 stars

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy