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
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
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
Explanation: Because of the above three properties, transactions are an ideal way of structuring interaction with a database.
4. Which of the following has “all-or-none” property?
a) Atomicity
b) Durability
c) Isolation
d) All of the mentioned
View Answer
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
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
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
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.
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
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
Explanation: Commit is used to store all the transactions.
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
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.
- Practice RDBMS MCQ
- Apply for Computer Science Internship
- Check Computer Science Books
- Practice Computer Science MCQs
- Check DBMS Books