RDBMS MCQ set number 00673

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

Answer

Answer: a [Reason:] 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

Answer

Answer: a [Reason:] 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

Answer

Answer: c [Reason:] 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.

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

Answer

Answer: d [Reason:] 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

Answer

Answer: a [Reason:] 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

Answer

Answer: a [Reason:] 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

Answer

Answer: a [Reason:] Timestamp is allotted when execution of a transaction begins.

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

Answer

Answer: b [Reason:] 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

Answer

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

ed010d383e1f191bdb025d5985cc03fc?s=120&d=mm&r=g

DistPub Team

Distance Publisher (DistPub.com) provide project writing help from year 2007 and provide writing and editing help to hundreds student every year.