Question
Consider the following transaction involving two bank accounts and .
The constraint that the sum of the accounts and should remain constant is that of
Official answer and solution
- Official answer
- B
- From
- Official GATE 2015 answer key
Solution
Recall the definitions of ACID properties in transaction processing.
ACID properties define transaction correctness in database systems:
- Atomicity: An 'all-or-nothing' execution guarantee.
- Consistency: The requirement that an execution of a transaction in isolation preserves database integrity constraints and business rules.
- Isolation: Each transaction executes unaware of concurrently executing transactions.
- Durability: Committed changes persist indefinitely even across system crashes.
Here, the requirement that the total money in the system () remains constant before and after the transfer represents an explicit integrity constraint (an application consistency invariant).
Therefore, preserving this sum is the responsibility of the Consistency property.
B
Confusing Atomicity (all operations execute or none do) with Consistency (preserving domain-specific invariants like account sum conservation).
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2015 Computer Science and Information Technology (CS) Session 2
- Question
- 11 of 65, printed as CS Q.1
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.