Managing Multiuser Databases

Name: _____________________

Date: _____________________

Instructions: Answer all questions. Write your answers clearly in the space provided.

Question 1:

Locks placed by command are called ________ .

A. implicit locks
B. explicit locks
C. exclusive locks
D. shared locks
Answer: _________
Question 2:

Which of the following locks the item from change but not from read?

A. Implicit lock
B. Explicit lock
C. Exclusive lock
D. Shared lock
Answer: _________
Question 3:

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?

A. Nonrepeatable read
B. Phantom read
C. Dirty read
D. Consistent read
Answer: _________
Question 4:

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

A. atomic.
B. consistent.
C. isolated.
D. durable.
Answer: _________
Question 5:

In this instance, dirty reads are disallowed, while nonrepeatable reads and phantom reads are allowed.

A. Read committed
B. Read uncommitted
C. Repeatable read
D. Serializable
Answer: _________
Question 6:

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

A. Nonrepeatable read
B. Phantom read
C. Dirty read
D. Consistent read
Answer: _________
Question 7:

The advantage of optimistic locking is that:

A. the lock is obtained only after the transaction has processed.
B. the lock is obtained before the transaction has processed.
C. the lock never needs to be obtained.
D. transactions that are best suited are those with a lot of activity.
Answer: _________
Question 8:

Which of the following refers to a cursor type where changes of any type and from any source are visible?

A. Forward only
B. Static
C. Keyset
D. Dynamic
Answer: _________
Question 9:

Which of the following disallows both dirty reads and nonrepeatable reads, but allows phantom reads?

A. Read committed
B. Read uncommitted
C. Repeatable read
D. Serializable
Answer: _________
Question 10:

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.

A. True
B. False
Answer: _________
Question 11:

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

A. True
B. False
Answer: _________
Question 12:

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

A. True
B. False
Answer: _________
Question 13:

Database administration refers to a function that applies to the entire organization.

A. True
B. False
Answer: _________
Question 14:

Locks placed by command are implicit locks.

A. True
B. False
Answer: _________
Question 15:

The goal of database security is to ensure that only authorized users can perform authorized activities at authorized times.

A. True
B. False
Answer: _________
Question 16:

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

A. True
B. False
Answer: _________
Question 17:

A transaction is a series of actions to be taken on the database so that either all of them are performed successfully or none of them are performed at all.

A. True
B. False
Answer: _________
Question 18:

A point of synchronization between the database and the transaction log is generally referred to as a stop point.

A. True
B. False
Answer: _________
Question 19:

An exclusive lock locks the item from change but not from read.

A. True
B. False
Answer: _________
Question 20:

Resource locking is a process to prevent multiple applications from obtaining copies of the same record when the record is about to be changed.

A. True
B. False
Answer: _________
Question 21:

The overall responsibility of the DBA is to facilitate the development and use of the database.

A. True
B. False
Answer: _________
Question 22:

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

A. True
B. False
Answer: _________
Question 23:

A durable transaction is one in which all committed changes are permanent.

A. True
B. False
Answer: _________
Question 24:

An ACID transaction is one that is atomic, consistent isolated, and durable.

A. True
B. False
Answer: _________
Question 25:

When one transaction reads a changed record that has not been committed to the database a filthy read occurs.

A. True
B. False
Answer: _________
Question 26:

The size of a lock is referred to as lock sizing.

A. True
B. False
Answer: _________
Question 27:

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

A. True
B. False
Answer: _________
Question 28:

Locks placed by the DBMS are explicit locks.

A. True
B. False
Answer: _________
Question 29:

In optimistic locking, the assumption is made that conflict will occur.

A. True
B. False
Answer: _________
Question 30:

Dirty read, nonrepeatable, and phantom reads are not possible in this instance.

A. Read committed
B. Read uncommitted
C. Repeatable read
D. Serializable
Answer: _________
Question 31:

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

A. atomic.
B. consistent.
C. isolated.
D. durable.
Answer: _________
Question 32:

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

A. forward only.
B. static.
C. keyset.
D. dynamic.
Answer: _________
Question 33:

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

A. Nonrepeatable read
B. Phantom read
C. Dirty read
D. Consistent read
Answer: _________
Question 34:

Which of the following allows dirty reads, nonrepeatable reads and phantom reads to occur?

A. Read committed
B. Read uncommitted
C. Repeatable read
D. Serializable
Answer: _________
Question 35:

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

A. Implicit lock
B. Explicit lock
C. Exclusive lock
D. Shared lock
Answer: _________
Question 36:

The size of a lock is called:

A. implicit lock
B. lock granularity
C. exclusive lock
D. shared lock
Answer: _________
Question 37:

A cursor type in which the application sees the data as they were at the time the cursor was opened is called:

A. forward only
B. static
C. keyset
D. dynamic
Answer: _________
Question 38:

What is the overall responsibility of the DBA?

A. Facilitate the development and use of the database
B. Create and populate tables
C. Development, operation, and maintenance of the database and its applications
D. Both the first and third answers above are correct.
Answer: _________
Question 39:

Locks placed by the DBMS are called ________ .

A. implicit locks
B. explicit locks
C. exclusive locks
D. shared locks
Answer: _________
Question 40:

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?

A. Forward only
B. Static
C. Keyset
D. Dynamic
Answer: _________

Answer Key

1: B
2: D
3: B
4: D
5: A
6: A
7: A
8: D
9: C
10: A
11: B
12: B
13: B
14: B
15: A
16: B
Solution: Phantom read does not refer to modifications or deletions of existing rows. It occurs when a transaction reads a set of rows that satisfy a condition, and then, upon re-execution of the same query, finds additional rows (phantoms) that were inserted by another committed transaction. This is different from non-repeatable reads , where a transaction rereads data and finds that it has been modified or deleted by another transaction. Therefore, the statement given in the question describes a non-repeatable read , not a phantom read.
17: A
18: B
19: B
20: A
21: A
22: A
23: A
24: A
25: B
26: B
27: A
28: B
29: B
30: D
31: A
32: A
33: C
34: B
35: C
36: B
37: B
38: D
39: A
40: C