Question 16 In the case of an uncommitted dependency problem, transaction A may
ID: 3916581 • Letter: Q
Question
Question 16 In the case of an uncommitted dependency problem, transaction A may rely on data that no longer exists if transaction B is aborted before it commits. True False
Question 15 When two transactions are in a deadlock, one of the transactions will eventually be cancelled or forced to re-start to let the other one continue execution. True False
Question 14 A(n) ____________________ is also known as a dirty read because it is caused by one transaction reading dirty data. a. interdependent retrieval b. lost update c. deadlock d. incorrect summary e. None of the above
Question 13 Any number of users can hold a shared lock on the same part of the database, but only one user can hold an exclusive lock on that part of the database. True False
Question 12 Which of the following will cause a deadlock? a. Transaction T1 requests an exclusive lock on data A at the same time as transaction T2 b. Transaction T1 places an exclusive lock on data A, then transaction T2 requests a shared lock on data A c. Transaction T1 places an exclusive lock on data A, then requests one on data B. Simultaneously, transaction T2 places an exclusive lock on data B, then requests one on data A d. Transaction T1 and T2 modify data A without any lock e. None of the above Question
11 For complex integrity constraints beyond the capability of CHECK constraints, SQL:2011 provides for ____________________, which can be used for constraints involving multiple tables and statistical calculations. a. domain constraints b. assertions c. access control tools d. data definitions e. none of the above
Question 10 The optimistic concurrency control approach may delay a transaction longer than the pessimistic approach would have, because with the optimistic approach the conflicting transactions have to be rolled back and restarted, rather than waiting for a lock to be released. True False
Explanation / Answer
Question 16
In the case of an uncommitted dependency problem, transaction A may rely on data that no longer exists if transaction B is aborted before it commits. True False
Answer: True
In uncommitted dependency data is changed by other transactions. So, a transaction reads data of another transaction which has not been committed yet.
Question 15
When two transactions are in a deadlock, one of the transactions will eventually be cancelled or forced to re-start to let the other one continue execution. True False
Answer: True
Once a deadlock is detected it is being corrected by following methods:
Terminating processes involved in deadlock: Terminating all the processes involved in deadlock or terminating process one by one until deadlock is resolved.
Resource Preemption: Another approach can be the preemption of resources and allocation of them to the other processes until the deadlock is resolved.
Question 14
A(n) ____________________ is also known as a dirty read because it is caused by one transaction reading dirty data.
a. interdependent retrieval b. lost update c. deadlock d. incorrect summary e. None of the above
Answer: None of the above
A dirty read also known as uncommitted dependency occurs when a transaction is allowed to read data from a row that has been modified by another running transaction and not yet committed.
Question 13
Any number of users can hold a shared lock on the same part of the database, but only one user can hold an exclusive lock on that part of the database. True False
Answer: True
Question 12
Which of the following will cause a deadlock?
a. Transaction T1 requests an exclusive lock on data A at the same time as transaction T2
b. Transaction T1 places an exclusive lock on data A, then transaction T2 requests a shared lock on data A
c. Transaction T1 places an exclusive lock on data A, then requests one on data B. Simultaneously, transaction T2 places an exclusive lock on data B, then requests one on data A
d. Transaction T1 and T2 modify data A without any lock
e. None of the above
Answer ©. Transaction T1 places an exclusive lock on data A, then requests one on data B. Simultaneously, transaction T2 places an exclusive lock on data B, then requests one on data A
Question 11
For complex integrity constraints beyond the capability of CHECK constraints, SQL:2011 provides for ____________________, which can be used for constraints involving multiple tables and statistical calculations.
domain constraints b. assertions c. access control tools d. data definitions e. none of the above
Answer: Assertions (b)
Question 10
The optimistic concurrency control approach may delay a transaction longer than the pessimistic approach would have, because with the optimistic approach the conflicting transactions have to be rolled back and restarted, rather than waiting for a lock to be released. True False
Answer:True
OCC is generally used in environments with low data contention. When conflicts are rare, transactions can complete without the expense of managing locks and without having transactions wait for other transactions' locks to clear, leading to higher throughput than other concurrency control methods. However, if contention for data resources is frequent, the cost of repeatedly restarting transactions hurts performance significantly; it is commonly thought that other concurrency control methods have better performance under these conditions