Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

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

Recommended Textbook for

ISE Financial Accounting

Authors: Robert Libby, Patricia Libby, Frank Hodge Ch

11th Edition

1265083924, 9781265083922

More Books

Students also viewed these Accounting questions