Database Questions and Answers – Transactions

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

Answer: a
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

Answer: b
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

Answer: c
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.
advertisement
advertisement

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

Answer: d
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

Answer: c
Explanation: Once a transaction has executed commit work, its effects can no longer be undone by rollback work.
advertisement

6. In order to maintain the consistency during transactions, database provides
a) Commit
b) Atomic
c) Flashback
d) Retain
View Answer

Answer: b
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

Answer: a
Explanation: None.
advertisement

8. A transaction completes its execution is said to be
a) Committed
b) Aborted
c) Rolled back
d) Failed
View Answer

Answer: a
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

Answer: c
Explanation: None.

10. ______ will undo all statements up to commit?
a) Transaction
b) Flashback
c) Rollback
d) Abort
View Answer

Answer: c
Explanation: Flashback will undo all the statements and Abort will terminate the operation.

Sanfoundry Global Education & Learning Series – Database Management System.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.