Question: 5 Subject: Distributed Databasebe Please solve both parts as this is single qs and both parts are related. Solve it when you are sure about
5
Subject: Distributed Databasebe
Please solve both parts as this is single qs and both parts are related. Solve it when you are sure about both.
a.
Consider two transactions T1 and T2 both access same data item A and they are executing in a serial manner. What output you will get at the end of each transaction. Assume the value of A is 4.
| T1 | T2 |
| Read(A) | Read(A) |
| A = A2 + 1 | A = A2 + 1 |
| Write(A) | Write(A) |
| Commit | Commit |
Answer:
b.
Suppose the transactions are executing concurrently in such a fashion as given in the table. Do you think that it will generate output if yes then write the output and also detect the problem if occur in the execution of these transactions?
| T1 | T2 |
| Read(A) | |
| A = A2 + 1 | |
| Read(A) | |
| Write(A) |
|
|
| A = A2 + 1 |
|
| Write(A |
| Commit |
|
|
| Commit |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
