Consider the following log sequence of two transactions on a bank account, with initial balance 12000, that transfer 2000 to a mortgage payment and, then apply a 5% interest (i) T1 start (ii) T1 B old = 12000 new = 10000 (ii) T1 M old = 0 new = 2000 (iv) T1 commit (v) T2 start (vi) T2 B old = 10000 new = 10500 (vii) T2 commit Suppose the database system crashed just before log record 7 is written. When the system is restarted, which one statement is true of the recovery procedure?

Consider the following log sequence of two transactions on a bank account, with initial balance 12000, that transfer 2000 to a mortgage payment and, then apply a 5% interest (i) T1 start (ii) T1 B old = 12000 new = 10000 (ii) T1 M old = 0 new = 2000 (iv) T1 commit (v) T2 start (vi) T2 B old = 10000 new = 10500 (vii) T2 commit Suppose the database system crashed just before log record 7 is written. When the system is restarted, which one statement is true of the recovery procedure? Correct Answer We must undo log record 6 to set B to 10000 and then redo log record 2 and 3

The correct answer is option 2.

Key Points

  • When the database system crashes after the transactions have committed then we need to redo the log records.
  • And if the database systems crash before the transactions have committed then we need to undo the log records.

From the concept, We must undo log record 6 to set B to 10000 and then redo log records 2 and 3 because the system fails before commit operations. So we need to undo active transactions(T2) and redo committed transactions (T1).

Note: Here we are not using checkpoints.

Checkpoint: Checkpoint is a mechanism where all the previous logs are removed from the system and stored permanently in a storage disk. Checkpoint declares a point before which the DBMS was in a consistent state, and all the transactions were committed.

Recovery:
When a system with concurrent transactions crashes and recovers, it behaves in the following manner.

∴ Hence the correct answer is We must undo log record 6 to set B to 10000 and then redo log record 2 and 3.

Related Questions

Section 58 enumerates some classes mortgages:
(1) Simple mortgage
(2) Mortgage by conditional sale
(3) Usufructuary mortgage
(4) English mortgage
(5) Equitable mortgage
(6) Anomalous mortgage
In the question below, are given a statement followed by three courses of actions numbered I, II and III. On the basis of the information given, you have to assume everything in the statement to be true, and then decide which of the following suggested courses of actions logically follow(s) for pursuing. Statement: In a bid to find a successor to founder CEO Rana Kapoor, The Yes Bank has formed a five member panel including two members from outside the bank, less than a week after Reserve Bank of India (RBI) cut short his tenure until January 31 2019. In a press release sent to the exchanges late on Tuesday evening, Yes Bank said that the “search and selection committee” would comprise of three members of the bank’s nomination and remuneration committee and also two external members, which the bank did not specify.  Courses of action: I. However, the board has requested the Reserve Bank of India (RBI) to grant an extension to Kapoor up to September 2019 ‘for finalization of audited financial statements for fiscal year ending March 2019 and in order for the statutory AGM process to be completed’. II. The board has also recommended the elevation of senior group presidents Rajat Monga and Pralay Mondal as executive directors ‘to ensure a long term succession plan within Yes Bank, and given the demonstrated track record of these two senior leaders’. All this will be subject to RBI approval.  III. The panel will comprise of five members and will focus on find a successor to Rana Kapoor.
The question given below consists of a statement, followed by three arguments numbered I, II and III. You have to decide which of the arguments is/are ‘strong’ arguments and which is/are ‘weak’ arguments and accordingly choose your answer from the alternatives given below each question. Statement: A shortage of bank branches and ATMs across India’s hinterland is holding back Prime Minister Narendra Modi’s financial inclusion efforts and risks angering rural voters ahead of elections next year. After taking office in 2014, Modi set an ambitious target to open a bank account for every household to ensure welfare funds flow directly to India’s poor, while improving access to credit and insurance programs. He pushed policies that helped bring 310 million people into the formal banking system in just four years, according to the World Bank. Based on the arguments stated below and he information stated above, which of the following arguments state the reason for the problem, ‘But many of India’s villages still lack bank branches or ATMs to help service new customers, while the pace of building new financial infrastructure has actually slowed’.  Arguments: I. Because Modi’s government effectively forced poor citizens into the banking system by linking some welfare benefits to bank accounts, villagers have ended up stuck in long queues and struggling with ATMs that often run out of cash or break down.  II. With an election due next year, the mismatch between the government’s policies and the rural banking system is generating frustration among a key slice of India’s electorate. III. The banking system struggled to keep up, while some gains proved temporary. Nearly half of Indian bank accounts were inactive in 2017, meaning they weren’t used at all in the previous 12 months
You are the database administrator for a financial services company. Employees enter data 24 hours a day into a SQL Server 2000 database. These employees report slower response times when new account information is gathered from branch offices and added to the database. You currently use the following BULK INSERT statement to add the account information.BULK INSERT finance.dbo.customersFROM 'd:bulkaccts143_10142000.txt'WITH DATAFILETYPE = 'char', FIELDTERMINATOR = 't', ROWTERMINATOR = 'n', TABLOCK You want to ensure that response times do not slow when new account information is added to the database. What should you do?