[SOLVED] 代写 concurrency database 1. Whitlock Department Stores runs a multiuser DBMS on a LAN file server. Unfortunately, at the present time, the DBMS does not enforce concurrency control. One Whitlock customer had a balance due of $500 when the following three transactions related to this customer were processed at the same time:

30 $

File Name: 代写_concurrency_database_1.__Whitlock_Department_Stores_runs_a_multiuser_DBMS_on_a_LAN_file_server._Unfortunately,_at_the_present_time,_the_DBMS_does_not_enforce_concurrency_control._One_Whitlock_customer_had_a_balance_due_of_$500_when_the_following_three_transactions_related_to_this_customer_were_processed_at_the_same_time:.zip
File Size: 3099.18 KB

SKU: 9809590185 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


1.Whitlock Department Stores runs a multiuser DBMS on a LAN file server. Unfortunately, at the present time, the DBMS does not enforce concurrency control. One Whitlock customer had a balance due of $500 when the following three transactions related to this customer were processed at the same time:
T1: Payment of $500
T2: Purchase on credit of $100
T3: Merchandise return (credit) of $50
a. In a real-world setting, serialization is enforced. What balance should be included for the customer after the three transactions execute in the given order? What will happen if they execute in a different order?
b. In this example concurrency control is not enforced and each of the three transactions reads the customer record when the balance was $500 (i.e., before any of the other transactions were completed). What balance will be included for the customer after the last transaction is completed (in the given order)?
c. Apply the standard two-phase locking protocol in the case above. How would that work? Does a deadlock occur?
d. Apply the versioning protocol. How would that work? Does any of the transactions rollback?

2. You are given two variables x and y, with original values x= 5 and y = 10 and two transactions T1 and T2 with the following steps:
T1: BEGIN TRANSACTION
Read x
x = x + 2
Write x – commit x
Read y
y = y+5
write y – commit y

T2: BEGIN TRANSACTION
Read x
x = x*3
Write x – commit x
Read y
y = y+2
write y – commit y

You also know the timeline for transaction 1:

A.Assuming that the database enforces no concurrency control, what will the final values for x and y be if transaction T2 begins at t1?
B.Assuming that the database enforces no concurrency control, what will the final values for x and y be if transaction T2 begins at t5?
C.Now assuming that the standard two-phase locking protocol is used to enforce serializability. If transaction T2 begins at t4, what will happen? At which timepoint will T2 be able to read x and at which timepoint will it write y? To answer this question, it is best if you draw the timeline of the two transactions, i.e. complete the above diagram with the T2 steps. What will the final values for x and y be?
D.Answer the same question if Transaction T2 begins at t1.
E.What will the timeline of the two transactions be if versioning is enforced? What will the final values for x and y be? At which timepoint?

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 代写 concurrency database 1. Whitlock Department Stores runs a multiuser DBMS on a LAN file server. Unfortunately, at the present time, the DBMS does not enforce concurrency control. One Whitlock customer had a balance due of $500 when the following three transactions related to this customer were processed at the same time:
30 $