




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The steps to recover a simpledb database using an existing log file. The process involves creating instances of logmgr for reading the log file and building a list of committed transactions. A new redo log file is then created by writing each log record to it. The program iterates through the records in the redo log file and calls the undo method on each record belonging to a committed transaction. However, the code provided does not work correctly as it redoes database modifications using their old values for committed transactions.
Typology: Lab Reports
1 / 8
This page cannot be seen from the preview
Don't miss anything!





Table STUDENT created. STUDENT records inserted. Table DEPT created. DEPT records inserted. Table COURSE created. COURSE records inserted. Table SECTION created. SECTION records inserted. Table ENROLL created. ENROLL records inserted.
new transaction: 1 creating new database transaction 1 committed database server ready new transaction: 2 transaction 2 committed new transaction: 3 transaction 3 committed new transaction: 4 transaction 4 committed new transaction: 5 transaction 5 committed new transaction: 6 transaction 6 committed new transaction: 7 transaction 7 committed new transaction: 8 transaction 8 committed new transaction: 9 transaction 9 committed
new transaction: 10 transaction 10 committed new transaction: 11 transaction 11 committed new transaction: 12 transaction 12 committed new transaction: 13 transaction 13 committed new transaction: 14 transaction 14 committed new transaction: 15 transaction 15 committed new transaction: 16 transaction 16 committed new transaction: 17 transaction 17 committed new transaction: 18 transaction 18 committed new transaction: 19 transaction 19 committed new transaction: 20 transaction 20 committed new transaction: 21 transaction 21 committed new transaction: 22 transaction 22 committed new transaction: 23 transaction 23 committed new transaction: 24 transaction 24 committed new transaction: 25 transaction 25 committed new transaction: 26 transaction 26 committed new transaction: 27 transaction 27 committed new transaction: 28 transaction 28 committed new transaction: 29 transaction 29 committed new transaction: 30 transaction 30 committed new transaction: 31 transaction 31 committed new transaction: 32 transaction 32 committed new transaction: 33 transaction 33 committed new transaction: 34 transaction 34 committed new transaction: 35 transaction 35 committed new transaction: 36 transaction 36 committed
Name Major joe compsci max compsci lee compsci sue math kim math pat math amy drama bob drama art drama
Name Major joe compsci max compsci lee compsci amy math sue math kim math pat math bob drama art drama
age simpledb.log; import static simpledb.tx.recovery.LogRecord. CHECKPOINT ; import static simpledb.tx.recovery.LogRecord. COMMIT ; import static simpledb.tx.recovery.LogRecord. SETINT ; import static simpledb.tx.recovery.LogRecord. SETSTRING ;
import java.util.ArrayList; import java.util.Collection; import java.util.Iterator;
import simpledb.buffer.Buffer; import simpledb.buffer.BufferMgr; import simpledb.server.SimpleDB; import simpledb.file.Block;
<SETINT,2,student.tbl,0,42,20,30> ←notice the new value of 30 <START,2> <COMMIT,1>
Name Major joe compsci max compsci lee compsci sue math kim math pat math amy drama bob drama art drama