Question: Write SECTION B: Question B2, your name and student ID on the top of the first page of your answer to this question. QUESTION B2.

 Write SECTION B: Question B2, your name and student ID on

Write SECTION B: Question B2, your name and student ID on the top of the first page of your answer to this question. QUESTION B2. (9 marks) Consider a database with objects A and B, and the following two transactions T1 and T2 involving those objects: Let the initial values of A and B be 100. Also let the consistency requirement be: A+B=200 (a) (2 marks) Show that every serial execution of these two transactions preserves the consistency of the database. (b) (3 marks) Construct a concurrent execution of T1 and T2 that produces a nonserializable schedule. Note: You may provide your answer in the tabular form given as follows: 7 (c) (2 marks) Place suitable lock instructions in T1 and T2 so that they follow the 2PL protocol. (d) (2 marks) Discuss whether any concurrent execution of these two resultant transactions, obtained in part (c) above, can result in a deadlock. Explain your answer by focusing only on the effect of the lock / unlock instructions you have introduced in part (c). Write SECTION B: Question B2, your name and student ID on the top of the first page of your answer to this question. QUESTION B2. (9 marks) Consider a database with objects A and B, and the following two transactions T1 and T2 involving those objects: Let the initial values of A and B be 100. Also let the consistency requirement be: A+B=200 (a) (2 marks) Show that every serial execution of these two transactions preserves the consistency of the database. (b) (3 marks) Construct a concurrent execution of T1 and T2 that produces a nonserializable schedule. Note: You may provide your answer in the tabular form given as follows: 7 (c) (2 marks) Place suitable lock instructions in T1 and T2 so that they follow the 2PL protocol. (d) (2 marks) Discuss whether any concurrent execution of these two resultant transactions, obtained in part (c) above, can result in a deadlock. Explain your answer by focusing only on the effect of the lock / unlock instructions you have introduced in part (c)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!