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
1. Consider the transaction T1 as given below; T1 enters from which of the transaction states into which other state if there is a failure after executing the instruction 7?
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) Active, Partially committed
b) Partially committed, Committed
c) Active, Failed
d) Partially committed, Failed
Answer: (d) Partially committed, Failed
A transaction is said to be in PARTIALLY COMMITTED state if it has successfully executed all the instructions in it. At this point, it may be found that the transaction has stopped due to system failure and any updates made to the data items by the transaction may not have been safely recorded on secondary storage. Or the transaction might have violated serializability or an integrity constraint and the transaction has to be aborted. In such cases, the transaction would go into the FAILED state. 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