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

Managing Multiuser Databases Questions and Answers

51.

Which of the following occurs when a transaction rereads data it has previously read and finds modification or deletions caused by a committed transaction?

Answer: A

Correct answer: Nonrepeatable read

A non-repeatable read occurs when a transaction reads a row, another transaction modifies or deletes it and commits, and the first transaction reads it again and sees something different. The remedy is the repeatable-read isolation level, which holds read locks to the end of the transaction.

Please log in or register to report this question.

52.

Which of the following locks the item from access of any type?

Answer: C

Correct answer: Exclusive lock

An exclusive lock excludes everyone else entirely: no other transaction may read the item or change it while the lock is held. It is what a writing transaction needs. A shared lock is the weaker form, permitting concurrent readers but no writer, which is why several may be held on the same item at once.

Please log in or register to report this question.

53.

The transaction log contains a copy of every database record (or page) after it has changed. These records are called before images.

Answer: B

Correct answer: False

A record of a page after it has changed is an after image; a before image is the copy taken beforehand. Both are kept, and each has its own use in recovery: after images are applied to roll a transaction forward, before images to roll it back.

Please log in or register to report this question.

54.

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.

56.

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.

57.

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.

58.

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.

59.

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.

Loading…
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