All Exams Test series for 1 year @ ₹349 only
Question

Consider the following sequence of two transactions on a bank account(A) with initial balance 20,000 that transfers 5,000 to another account (B) and then apply 10% interest.

(i) T1 start

(ii) T1 A old = 20000 new 15,000

(iii) T1 B old = 12000 new = 17000

(iv) T1 commit

(v) T2 start

(vi) T2 A old = 15000 new = 16500

(vii) T2 commit

Suppose the database system crashes out just before log record (vii) is written. When the system is restricted, which one statement is true of the recovery process?

The correct answer is

Undo T2’s uncommitted update and ensure T1’s committed updates are durable, redoing them if needed; the recovered balances are A = 15,000 and B = 17,000.

T1 has a commit record, but T2 does not. Undoing record (vi) restores its old value A = 15,000; T1’s durable result is A = 15,000 and B = 17,000. Committing T1 does not by itself prove that all updated data pages reached disk, so its updates must be redone if needed.

Was this answer helpful?

Important Questions from States of Transaction - Teaching

  1. A transaction may be in one of the following states during its execution life cycle in concurrent execution environment.

    A. FAILED

    B. TERMINATED

    C. PARTIALLY COMMITTED

    D. COMMITTED

    E. ACTIVE

    Given a transaction in active state during its execution, find its next transitioned state from the options given below :

  2. Which of the DBMS component ensures that concurrent execution of multiple operations on the database results into a consistent database state?

  3. A restaurant ordering system is modelled with a UML sequence diagram. Use exactly one lifeline for each distinct named participant in the following exchanges; do not merge participants or add lifelines for message parameters.

    1. Customer sends placeOrder to OrderController.

    2. OrderController sends prepareOrder to Kitchen.

    3. Kitchen sends orderReady to Server.

    4. Server sends serveItems to Customer.

    5. Customer sends requestBill to Server.

    6. Server sends prepareBill to BillingService.

    7. BillingService returns the bill to Server, which presents it to Customer.

    8. Customer sends payBill to BillingService.

    How many lifelines represent the participants in this specified diagram?

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App