The questions can come in any order, so make sure you are selecting right option for all questions.
1. There are two transactions A and B accessing a department database simultaneously. Transaction A is updating the database to give all employees in the department a 3% raise in their salary while transaction B is computing the total salary bill of the department. The two transactions interfere since the total salary bill changes as the transaction A updates the employee records. The total salary retrieved by transaction B may be a sum of some salaries before the raise and others after the raise. This could not be considered an acceptable value of the total salary but the value before the raise or the value after the raise is acceptable. The problem illustrated in the figure is called the inconsistent retrieval anomaly. Label the missing transactions to complete the process.Transaction 1
(c) Read employee 100
Transaction 2
(b) Sum = 0.0
Transaction 3
(a) Update salary
Transaction 4
(c) Read employee 100
Transaction 5
(d) Write employee 100
Transaction 6
(e) Sum = sum + salary
Transaction 7
(a) Read employee 101
Transaction 8
(d) Update salary
Transaction 9
(b) Write employee 101
Transaction 10
(a) Read employee 101
Transaction 11
(e) Sum = sum + salary
Transaction 1
(a) Read Q
Transaction 2
(b) Update Q
Transaction 3
(c) Write Q
Transaction 4
(a) Read Q
Transaction 5
(d) Read R
Transaction 6
(b) Update Q
Transaction 7
(c) Wrire Q
Transaction 8
(e) Faliure (rollback)
Transaction 1
(a) Read N
Transaction 2
(a) Read N
Transaction 3
(c) N := N – 5
Transaction 4
(d) N := N – 4
Transaction 5
(a) Read N
Transaction 6
(a) Read N