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

Managing Multiuser Databases Questions and Answers

41.

Two transactions that run concurrently and generate results that are consistent with the results that would have occurred if they had run separately are referred to as serializable transactions.

Answer: A

Correct answer: True

Serializable transactions produce a result identical to some serial execution of the same transactions, one after another. It is the standard against which concurrency control is judged: the transactions may interleave in any way at all, so long as the outcome could have been produced by running them in some order.

Please log in or register to report this question.

42.

Which of the following refers to a cursor type that when the cursor is opened, a primary key value is saved for each row in the recordset; when the application accesses a row, the key is used to fetch the current values of the row?

Answer: C

Correct answer: Keyset

A keyset cursor saves the primary key of every row in the recordset when it is opened, and fetches the current values through that key each time a row is accessed. So changes made to rows already in the set are seen, but rows inserted afterwards are not, since their keys were never captured - it sits between static and dynamic.

Please log in or register to report this question.

43.

A transaction in which either all of the database actions occur or none of them do is called:

Answer: A

Correct answer: atomic.

Atomicity is the all-or-nothing property: the transaction either completes in full or leaves the database exactly as it found it. It is the first of the four ACID properties, the others being consistency, isolation and durability. It is what makes a multi-step operation such as a transfer between accounts safe.

Please log in or register to report this question.

44.

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.

45.

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.

46.

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.

47.

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.

49.

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.

50.

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.

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