Wednesday 3 June 2020

UGC NET Computer Science December 2019 | Question 123

Question 123
Two concurrent executing transactions T1 and T2 are allowed to update same stock item say 'A' in an uncontrolled manner. In such scenario. following problems may occur :
(a) Dirty read problem
(b) Lost update problem
(c) Transaction failure
(d) Inconsistent database state
Which of the following option is correct if database system has no concurrency module and allows concurrent execution of above two transactions?
  1. 1. (a), (b) and (c) only
  2. 2. (c) and (d) only
  3. 3. (a) and (b) only
  4. 4. (a), (b) and (d) only
Answer : 4. (a), (b) and (d) only

Explanation Question 123

Following problems can occur when concurrent transactions execute in an uncontrolled manner:
  1. The Lost Update Problem. When two transactions access the same database items and also perform their own operations in a way that makes the value of some database item wrong, a lost update problem takes place.
  2. Uncommitted Dependency - Dirty Read Problem(or Temporary Update Problem). A dirty read problem occurs when a transaction updates an item in the database and then there is a failure in the transaction for some reason. As the transaction fails, the updated item in the database is accessed by another transaction before it can go back to the original value.
  3. The Incorrect Summary Problem. If one transaction is calculating an aggregate summary function on a number of database items while other transactions are updating some of these items, the aggregate function may calculate some values before they are updated and others after they are updated.
  4. The Unrepeatable Read Problem. Another problem that may occur is called unrepeatable read, where a transaction T reads the same item twice and the item is changed by another transaction T between the two reads. Hence, T receives different values for its two reads of the same item.
  5. Phantom Read Problem

The Unrepeatable Read Problem Example
Suppose two users X and Y access a department’s database concurrently. User X is updates the database to provide all employees with a salary raise of 5%. At the same time, user Y wants to know the total salary that has been paid to the department.
As the two transactions are being executed simultaneously on the same database, there is always a high probability to interfere with each other. As a result, the sum includes certain salaries before the raise and certain salaries subsequent to the raise. Such a sum cannot be considered as an acceptable value of the total salary (the value before the raise or after the raise would be different)

Reference 1 : Concurrency problems in DBMS Transactions

Reference 1 : Concurrency Anomalies - Incorrect Summary Problem

From above we can conclude that only options (a), (b) and (d) can be included in problems whoch can occur when concurrent transactions execute in an uncontrolled manner.

So, option 4 is correct answer

PreviousNext
UGC NET CS December 2019 - Question 122UGC NET CS December 2019 - Question 124

No comments:

Post a Comment

UGC NET Computer Science December 2019 | Question 16

Question 16 In a certain coding language. 'AEIOU' is written as 'TNHDZ'. Using the same coding language. 'BFJPV' wil...

Popular Posts