Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following transactions T and T2 T2 product = 1 read item(A) product = product*A A=A-1 Time Ti 1 read item(A) 2 A=A-2 3

image text in transcribed

Consider the following transactions T and T2 T2 product = 1 read item(A) product = product*A A=A-1 Time Ti 1 read item(A) 2 A=A-2 3 4 5 write item(A) 6 7 8 read item(B) 9 B=B+1 10 write item(B) 11 commit 12 13 14 15 16 write item(A) read item(B) B=B+1 product = product *B commit At time step 0 the value of A is 3 and B is 5. 1. (8 marks) What are the values of the data items A and B after time step 16? What value does the product havet? You should give a table, having the values of the data items Note that product is a local variable of the transaction, that does not necessarily exist in the database. in the database at each time step, as well as the value of the local variable "product". We assume that the local variable "product" doesn't have a value before the time step 3. Your solution should start like in the following table. Time A B product 5 n/a n/a : : : 0 1 3 3 5 2. (1 marks) What are the final values of the data items A and B if we first execute Ti, and then T2? What final value does the "product" have? 3. (1 marks) What are the final values of the data items A and B if we first execute T2, and then T? What final value does the product have

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions