RDBMS Questions and Answers – Transaction Isolation Levels

This set of RDBMS Question Bank focuses on “Transaction Isolation Levels”.

1. Which of the following is a transaction isolation level as specified by SQL standard?
a) Serializable
b) Repeatable read
c) Read committed
d) All of the mentioned
View Answer

Answer: a
Explanation: Serializable, repeatable read, read committed and read uncommitted are the four levels of transactions.

2. State true or false: Serializable level may allow both serializable and non-serializable executions
a) True
b) False
View Answer

Answer: a
Explanation: Serializable level generally allows only serializable executions but in some special cases, it may also allow non-serializable execution.

3. ________ allows only committed data to be read and further requires that no other transaction is allowed to update it between two reads of a data item by a transaction.
a) Read uncommitted
b) Serializable
c) Repeatable read
d) Read committed
View Answer

Answer: c
Explanation: Repeatable read allows only committed data to be read and further requires that no other transaction is allowed to update it between two reads of a data item by a transaction. However, the transaction may not be serializable with respect to other transactions.
advertisement
advertisement

4. ________ allows only committed data to be read, but does not require repeatable reads
a) Read uncommitted
b) Serializable
c) Repeatable read
d) Read committed
View Answer

Answer: d
Explanation: Read committed allows only committed data to be read, but does not require repeatable reads. For instance, between two reads of a data item by the transaction, another transaction may have updated the data item and committed.

5. ___________ allows uncommitted data to be read
a) Read uncommitted
b) Serializable
c) Repeatable read
d) Read committed
View Answer

Answer: a
Explanation: Real uncommitted allows uncommitted data to be read. It is the lowest isolation level allowed by SQL.

6. State true or false: All the isolation levels disallow dirty writes
a) True
b) False
View Answer

Answer: a
Explanation: All the isolation levels above additionally disallow dirty writes, that is, they Disallow writes to a data item that has already been written by another transaction that has not yet committed or aborted.

7. When is a timestamp allotted
a) When execution begins
b) When execution is taking place
c) When execution is completed
d) None of the mentioned
View Answer

Answer: a
Explanation: Timestamp is allotted when execution of a transaction begins.
advertisement

8. In ___________ isolation each transaction is given its own version of the database
a) Timestamp
b) Snapshot
c) Lock based
d) All of the mentioned
View Answer

Answer: b
Explanation: In snapshot isolation, each transaction is given its own version or snapshot of the database on which it can operate.

9. What is the disadvantage of locking?
a) Does not control concurrency
b) Is not atomic
c) Is not durable
d) Has a poor degree of concurrency
View Answer

Answer: Locking has a poor degree of concurrency. It in fact has no concurrency at all.
advertisement

Sanfoundry Global Education & Learning Series – RDBMS.

To practice RDBMS Question Bank, here is complete set of 1000+ Multiple Choice Questions and Answers.

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.