Question:

An audit of a banking transactions system has found that on an earlier occasion, two joint holders of account \( A \) attempted simultaneous transfers of Rs. 10000 each from account \( A \) to account \( B \). Both transactions read the same value, Rs. 11000, as the initial balance in \( A \) and were allowed to go through. \( B \) was credited Rs. 10000 twice. \( A \) was debited only once and ended up with a balance of Rs. 1000. Which of the following properties is/are certain to have been violated by the system?

Show Hint

In transaction management, Consistency ensures that a database remains in a valid state before and after a transaction, while Isolation prevents interference between concurrent transactions. Violating these can lead to anomalies like lost updates and incorrect balances.
Updated On: Apr 7, 2025
  • Atomicity
  • Consistency
  • Isolation
  • Durability
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B, C

Solution and Explanation

The given scenario indicates that both transactions simultaneously read the same initial balance of Rs. 11000 and both proceeded without correctly updating account \( A \). The key violations are:
  • Consistency Violation: The final state of the system is incorrect. The balance in \( A \) should have been Rs. -9000 (if both transactions were allowed) or Rs. 1000 (if only one transaction was allowed). However, \( B \) was credited Rs. 20000 while \( A \) was debited only Rs. 10000, leading to an inconsistent system state. This inconsistency arises because both transactions operated on the same initial balance without properly updating the account.
  • Isolation Violation: Transactions were not executed in isolation. They read the same initial balance and executed concurrently, leading to an incorrect final state. If transactions were properly isolated, the second transaction would have seen an updated balance before proceeding, ensuring correct execution of both transactions. The lack of isolation led to the violation of the expected transaction behavior.
Other properties:
  • Atomicity: This property ensures that either a transaction is fully executed or not at all. Since each transaction individually executed fully, atomicity was not necessarily violated. The transactions were atomic in their execution, meaning that if one failed, its effects would have been rolled back.
  • Durability: There is no indication that committed transactions were lost after execution, so durability remains intact. Even though there was an issue with consistency, the final state would still persist, and the results of the transactions would not be lost.

Thus, the correct answer is (B) Consistency, (C) Isolation.

Was this answer helpful?
0
0

Questions Asked in GATE CS exam

View More Questions