Let T1 be a transaction that transfers Rs. 50 from account A to account B: 1 Read(A); 2 A := A − 50; 3 Write(A); 4 Read(B); 5 B := B + 50; 6 Write(B). What is the status of the database just after the 3rd step but before the 5th step?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. May be temporarily inconsistent
Explanation
After A has been debited but before B is credited, the sum A + B is off by 50. This temporary inconsistency is allowed inside a transaction.More Database Management Systems questions
- Consider Student(stuid, dept, clsroll) with FD1: stuid → dept, FD2: dept → stuid, FD3: stuid → clsroll, FD4: clsroll → stuid, FD5: dept → c…
- Match List I with List IIList I List II A. Timestamp protocol I. As long as the transaction is running, it obtains the required locks in th…
- Consider the schedule S (operations at successive timestamps t1–t6): t1: T2 R(X), T3 R(Y) t2: T2 W(X), T3 W(Y) t3: T1 R(Y), T4 R(X) t4: T1…
- Statement I: Any retrieval request that can be specified in basic relational algebra can also be specified in relational calculus. Statemen…
- Which of the following queries would retrieve the roll numbers and names of students who have enrolled in ALL the prerequisite courses of c…
- Given the query SELECT s.rollno FROM student s WHERE s.sex = ALL (SELECT f.sex FROM professor f WHERE f.empid = s.advisor); which retrieves…