Multiple
choices questions in DBMS, Transaction states in database, What will go
wrong to a transaction in case a system crash happens during its execution? Aborted, partially committed, committed and active states of transaction. What are the different possibilities that lead a transaction to fail?
DBMS MCQ - System crash and state of a transaction
7. Consider the transaction T1 as given below; T1 enters into which of the following states if there is a system crash after the instruction 5?
T1 |
|
1 2 3 4 5 6 7 8 |
Begin_transaction Read(A) A:=A-500; Write(A); Read(B) B:=B+500; Write(B); Commit; |
a) Partially committed
b) Committed
c) Aborted
d) Failed
Answer: (d) Failed A transaction enters into FAILED state if the transaction cannot be committed or the transaction is aborted while in the ACTIVE state, perhaps due to the user aborting the transaction or as a result of system failures (system crash, transaction errors, disk failures etc.) or as a result of the concurrency control protocol aborting the transaction to ensure serializability. The transaction at FAILED state is rolled back to undo the changes made to the data items and ABORTED.Transaction statesActive - if a transaction starts its execution it is said to be in active statePartially committed - if a transaction successfully executed it last statement Committed - if a transaction successfully executed commit statement.Failed - if a transaction is not able to proceed for various reasons (refer above)Aborted - if a transaction reached a failed state, then it will be aborted.
|
- Go to Multiple Choice Questions in DBMS home
- Go to Normalization - MCQs page
- Go to General Mixed Quiz in all topics of DBMS page
Go to Advanced DBMS Concepts page
No comments:
Post a Comment