Machine-translated by Google. Questions are authored in English.
Top

Managing Multiuser Databases Questions and Answers

41.

The lost update problem is when User A reads data that have been processed by a portion of a transaction from User B.

Answer: B

Correct answer: False

What is described is a dirty read - seeing data from a transaction that is only part way through. The lost update problem is different: two transactions each read the same value, each compute a new one from it, and each write back, so the second silently destroys the first. Resource locking exists to prevent it.

Please log in or register to report this question.

Answer: A

Correct answer: the lock is obtained only after the transaction has processed.

Optimistic locking assumes conflict will be rare: the transaction reads, does its work without holding locks, and only at the end takes a lock long enough to check that nothing it relied on has changed. If something has, the transaction is rolled back and retried. Locks are therefore held for a very short time, which is where the concurrency gain comes from.

Please log in or register to report this question.

43.

Which of the following occurs when a transaction rereads data and finds new rows that were inserted by a command transaction since the prior read?

Answer: B

Correct answer: Phantom read

A phantom read is the appearance of new rows that were not there on the earlier read, inserted and committed by another transaction in the interval. It is distinct from a nonrepeatable read, where rows already seen have changed or gone. Only the serializable isolation level prevents phantoms.

Please log in or register to report this question.

44.

The size of the lock is referred to as the lock granularity.

Answer: A

Correct answer: True

Lock granularity is the size of the item locked, from a single row up to the whole database. Fine granularity allows more transactions to proceed at once but requires far more locks to be held and checked; coarse granularity is cheap to administer but blocks transactions that would not really have conflicted.

Please log in or register to report this question.

45.

When two transactions are being processed against the database at the same time they are termed concurrent transactions.

Answer: A

Correct answer: True

Transactions are concurrent when their execution overlaps in time, whether or not they touch the same data. The whole apparatus of locking and isolation levels exists to make concurrent transactions behave as though they had run one after another, which is what serializability means.

Please log in or register to report this question.

46.

Which of the following occurs when one transaction reads a changed record that has not been committed to the database?

Answer: C

Correct answer: Dirty read

A dirty read is reading data that another transaction has changed but not yet committed. If that transaction subsequently rolls back, the value read never existed in the database at all, and any decision taken on it is unfounded. Only the read uncommitted isolation level permits it.

Please log in or register to report this question.

Answer: D

Correct answer: Both the first and third answers above are correct.

The two statements are the same responsibility described at two levels. The DBA facilitates the development and use of the database, and that facilitation covers the development, operation and maintenance of the database and its applications. Creating and populating tables is one task within that, not a statement of the overall responsibility.

Please log in or register to report this question.

48.

A transaction for which all committed changes are permanent is called:

Answer: D

Correct answer: durable

Durability means that once a transaction has committed, its changes are permanent and survive any subsequent failure. It is achieved by writing to a log on stable storage before the commit is acknowledged.

Please log in or register to report this question.

49.

A cursor type in which the application can only move forward through the recordset is called:

Answer: A

Correct answer: forward only.

A forward-only cursor can move through the recordset in one direction and cannot return to a row it has passed. It is the cheapest kind, since nothing needs to be retained behind the current position, and it is the right choice whenever the application simply processes each row once.

Please log in or register to report this question.

50.

A phantom read occurs when a transaction rereads data it has previously read and finds modifications or deletions caused by a committed transaction.

Answer: B

Correct answer: False

What is described is a nonrepeatable read: rows already seen have been modified or deleted by a committed transaction. A phantom read is the appearance of new rows that were not there before. The distinction decides which isolation level is needed, since repeatable read prevents the first but not the second.

Please log in or register to report this question.

Loading…

Other Subjects

Tags: Managing Multiuser Databases Questions and Answers || Managing Multiuser Databases MCQ Questions and Answers || Managing Multiuser Databases GK Questions and Answers || Managing Multiuser Databases GK MCQ Questions || Managing Multiuser Databases Multiple Choice Questions and Answers || Managing Multiuser Databases GK || GK on Managing Multiuser Databases || Database Questions and Answers || Database MCQ Questions and Answers || Database GK Questions and Answers || GK on Database