Question: Here are two transactions that are ordering a food menu at the same time. T1: Start the transaction at time t1, read 10 servings of

Here are two transactions that are ordering a food menu at the same time.

T1: Start the transaction at time t1, read 10 servings of food stock at t2. Because ordering one portion, the stock is reduced by 1 at t3. On t6, update the stock quantity, and commit on t7.

T2: Transaction T2 starts a transaction on t2, reads the number of stocks on t3 as many as 10. At t4 orders 3 portions. At t5, it updates the stock to 7 and then at t6 commits it.

As a result of the transactions T1 and T2 above, there is an error in the number of food stocks. Make a solution with 2PL. What kinds of problems happened? Give reasons why you chose this type of problem! How much food is still available?

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 Databases Questions!