This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Transactions”.
1. A _________ consists of a sequence of query and/or update statements.
a) Transaction
b) Commit
c) Rollback
d) Flashback
View Answer
Explanation: Transaction is a set of operation until commit.
2. Which of the following makes the transaction permanent in the database?
a) View
b) Commit
c) Rollback
d) Flashback
View Answer
Explanation: Commit work commits the current transaction.
3. In order to undo the work of transaction after last commit which one should be used?
a) View
b) Commit
c) Rollback
d) Flashback
View Answer
Explanation: Rollback work causes the current transaction to be rolled back; that is, it undoes all the updates performed by the SQL statements in the transaction.
4. Consider the following action:
TRANSACTION..... Commit; ROLLBACK;
What does Rollback do?
a) Undoes the transactions before commit
b) Clears all transactions
c) Redoes the transactions before commit
d) No action
View Answer
Explanation: Once a transaction has executed commit work, its effects can no longer be undone by rollback work.
5. In case of any shut down during transaction before commit which of the following statement is done automatically?
a) View
b) Commit
c) Rollback
d) Flashback
View Answer
Explanation: Once a transaction has executed commit work, its effects can no longer be undone by rollback work.
6. In order to maintain the consistency during transactions, database provides
a) Commit
b) Atomic
c) Flashback
d) Retain
View Answer
Explanation: By atomic, either all the effects of the transaction are reflected in the database, or none are (after rollback).
7. Transaction processing is associated with everything below except
a) Conforming an action or triggering a response
b) Producing detail summary or exception report
c) Recording a business activity
d) Maintaining a data
View Answer
Explanation: None.
8. A transaction completes its execution is said to be
a) Committed
b) Aborted
c) Rolled back
d) Failed
View Answer
Explanation: A complete transaction always commits.
9. Which of the following is used to get back all the transactions back after rollback?
a) Commit
b) Rollback
c) Flashback
d) Redo
View Answer
Explanation: None.
10. ______ will undo all statements up to commit?
a) Transaction
b) Flashback
c) Rollback
d) Abort
View Answer
Explanation: Rollback will undo all statements up to commit. Flashback allows you to restore the database to a previous state, even after a COMMIT has been executed. Abort will terminate the operation.
Sanfoundry Global Education & Learning Series – Database Management System.
- Apply for Computer Science Internship
- Check Computer Science Books
- Check DBMS Books
- Practice Programming MCQs
- Check Programming Books