1) Questions on transactions, concurrency control and recovery. Answer each part
ID: 3765441 • Letter: 1
Question
1) Questions on transactions, concurrency control
and recovery. Answer each part. Assume there is a part table given by the following when
relevant.
Also assume, where relevant, that clients have submitted the following sequence of requests
to the database that access and update tuples in the part table.
T1: begin
T1: read the price of part 4
T2: begin
T2: change the color of part 4 to 'yellow'
T3: begin
T3: read the price of part 4
T1: read the color of part 1
T4: begin
T4: change the name of part 1 to 'Block'
T2: change the price of part 5 to 150.00
T3: read the price of part 2
T2: commit
T4: change the department of part 5 to 'Machining'
T1: commit
T3: commit
T4: Commit
Question:
Indicate whether each of the following statements is true or false. In each case, justify
your answer with no more than three sentences.
A) Given an arbitrary schedule for interleaving the execution of a given set of transactions, there is an ecient algorithm to determine if the schedule is serializable.
B)Given that a system failure had occurred, there is an ecient algorithm to recover all transactions that were aborted by using a log.
Explanation / Answer
a) True
Because the schedulinh happens in order and based on the priority as per the sequence mentioned in the code. SO it is serializable
b)
False
We cannot recover as there are another process starting before a particular process is getting comitted. Take an example of below line
T4: change the department of part 5 to 'Machining'
If crash happens where we will go to the last commit point which is T2 and the process T1 will be lost as it is committing after T2 and starting before T2. so there is not algorithm here to recover all transactions.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.