Database Questions and Answers – Transaction Concept

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Transaction Concept”.

1. Consider money is transferred from (1)account-A to account-B and (2) account-B to account-A. Which of the following form a transaction?
a) Only 1
b) Only 2
c) Both 1 and 2 individually
d) Either 1 or 2
View Answer

Answer: c
Explanation: The term transaction refers to a collection of operations that form a single logical unit of work.

2. A transaction is delimited by statements (or function calls) of the form __________
a) Begin transaction and end transaction
b) Start transaction and stop transaction
c) Get transaction and post transaction
d) Read transaction and write transaction
View Answer

Answer: a
Explanation: The transaction consists of all operations executed between the begin transaction and end transaction.

3. Identify the characteristics of transactions
a) Atomicity
b) Durability
c) Isolation
d) All of the mentioned
View Answer

Answer: d
Explanation: Because of the above three properties, transactions are an ideal way of structuring interaction with a database.
advertisement
advertisement

4. Which of the following has “all-or-none” property?
a) Atomicity
b) Durability
c) Isolation
d) All of the mentioned
View Answer

Answer: a
Explanation: Either all operations of the transaction are reflected properly in the database, or none are.

5. The database system must take special actions to ensure that transactions operate properly without interference from concurrently executing database statements. This property is referred to as
a) Atomicity
b) Durability
c) Isolation
d) All of the mentioned
View Answer

Answer: c
Explanation: Even though multiple transactions may execute concurrently, the system guarantees that, for every pair of transactions Ti and Tj, it appears to Ti that either Tj finished execution before Ti started or Tj started execution after Ti finished.

6. The property of a transaction that persists all the crashes is
a) Atomicity
b) Durability
c) Isolation
d) All of the mentioned
View Answer

Answer: b
Explanation: After a transaction completes successfully, the changes it has made to the database persist, even if there are system failures.

7. __________ states that only valid data will be written to the database.
a) Consistency
b) Atomicity
c) Durability
d) Isolation
View Answer

Answer: a
Explanation: If for some reason, a transaction is executed that violates the database’s consistency rules, the entire transaction will be rolled back and the database will be restored to a state consistent with those rules.
advertisement

8. Transaction processing is associated with everything below except
a) Producing detail summary or exception reports
b) Recording a business activity
c) Confirming an action or triggering a response
d) Maintaining a data
View Answer

Answer: c
Explanation: Collections of operations that form a single logical unit of work are called transactions.

9. The Oracle RDBMS uses the ____ statement to declare a new transaction start and its properties.
a) BEGIN
b) SET TRANSACTION
c) BEGIN TRANSACTION
d) COMMIT
View Answer

Answer: b
Explanation: Commit is used to store all the transactions.
advertisement

10. ____ means that the data used during the execution of a transaction cannot be used by a second transaction until the first one is completed.
a) Consistency
b) Atomicity
c) Durability
d) Isolation
View Answer

Answer: d
Explanation: Even though multiple transactions may execute concurrently, the system guarantees that, for every pair of transactions Ti and Tj, it appears to Ti that either Tj finished execution before Ti started or Tj started execution after Ti finished.

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.