Deck 10: Transaction Management and Concurrency Control
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/85
Play
Full screen (f)
Deck 10: Transaction Management and Concurrency Control
1
In a page-level lock, the DBMS will lock an entire diskpage.
True
2
Most real-world database transactions are formed by only one database request.
False
3
Timestamps must only have the single property of uniqueness.
False
4
A scheduler facilitates data isolation to ensure that two transactions do not update the same data element at the same time.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
5
A growing phase in a two-phase lock is when a transaction acquires all the required locks without locking any data.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
6
The phenomenon of uncommitted data occurs when two transactions are executed concurrently and the first transaction is rolled back after the second transaction has already accessed the uncommitted data-thus violating the isolation property of transactions.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
7
Time stamping demands a lot of system resources because many transactions might have to be stopped, rescheduled, and stamped.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
8
Durability requires that all portions of the transaction must be treated as a single, logical unit of work in which all operations are applied and completed to produce a consistent database.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
9
The multiuser DBMS must implement controls to ensure serializability and isolation of transactions, in addition to atomicity and durability, in order to guard the database's consistency and integrity.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
10
Serializability means that data used during the execution of a transaction cannot be used by a second transaction until the first one is completed.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
11
The DBMS guarantees that the semantic meaning of a transaction truly represents the real-world event.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
12
The scheduler establishes the order in which the operations within concurrent transactions are executed.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
13
A shared lock produces no conflict as long as all the concurrent transactions are read-write only.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
14
To ensure consistency of the database, every transaction must begin with the database in an unstable state.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
15
Atomicity indicates the permanence of the database's consistent state.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
16
A field-level lock allows concurrent transactions to access the same row, as long as they require the use of different fields within that row.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
17
When using an optimistic approach, during the read phase, a transaction reads the database, executes the needed computations, and makes the updates to a private copy of the database values.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
18
Incomplete or improper transactions can have a devastating effect on database integrity.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
19
A lock guarantees the open use of a data item to multiple transactions.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
20
Although the DBMS is designed to recover a database to a previous consistent state when an interruption prevents the completion of a required set of transactions, the transactions themselves are defined by the end user or programmer and must be semantically correct.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
21
A single-user database system automatically ensures of the database, because only one transaction is executed at a time.
A) serializability and durability
B) atomicity and isolation
C) serializability and isolation
D) atomicity and serializability
A) serializability and durability
B) atomicity and isolation
C) serializability and isolation
D) atomicity and serializability
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
22
As long as two transactions, T1 and T2, access data, there is no conflict, and the order of execution is irrelevant to the final outcome.
A) shared
B) common
C) unrelated
D) locked
A) shared
B) common
C) unrelated
D) locked
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
23
When using an optimistic approach, during the write phase, the transaction is validated to ensure that the changes made will not affect the integrity and consistency of the database.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
24
The reason for the different levels of isolation is to increase transaction concurrency.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
25
The serializable isolation level is the least restrictive level defined by the ANSI SQL standard.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
26
A transaction is a unit of work that must be either entirely completed or aborted.
A) timed
B) practical
C) logical
D) physical
A) timed
B) practical
C) logical
D) physical
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
27
ANSI defines four events that signal the end of a transaction. Of the following events, which is defined by ANSI as being equivalent to a ROLLBACK?
A) Five SQL statements are executed.
B) The end of a program is successfully reached.
C) The program is abnormally terminated.
D) The database is shut down for maintenance.
A) Five SQL statements are executed.
B) The end of a program is successfully reached.
C) The program is abnormally terminated.
D) The database is shut down for maintenance.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
28
means that data used during the execution of a transaction cannot be used by a second transaction until the first one is completed.
A) Serializability
B) Atomicity
C) Isolation
D) Time stamping
A) Serializability
B) Atomicity
C) Isolation
D) Time stamping
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
29
The ANSI has defined standards that govern SQL database transactions. Transaction support is provided by two SQL statements: and ROLLBACK.
A) RETRIEVE
B) ASSIGN
C) UPDATE
D) COMMIT
A) RETRIEVE
B) ASSIGN
C) UPDATE
D) COMMIT
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
30
The last step in the write-through technique recovery procedure is to identify the last checkpoint in the transaction log.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
31
occurs when a transaction accesses data before and after one or more other transactions finish working with such data.
A) Inconsistent retrievals
B) The phenomena of uncommitted data
C) Lost update problems
D) Dirty read problems
A) Inconsistent retrievals
B) The phenomena of uncommitted data
C) Lost update problems
D) Dirty read problems
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
32
All transactions must display .
A) atomicity, consistency, and durability
B) durability and isolation
C) consistency, durability, and isolation
D) atomicity, durability, consistency, and isolation
A) atomicity, consistency, and durability
B) durability and isolation
C) consistency, durability, and isolation
D) atomicity, durability, consistency, and isolation
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
33
The information stored in the is used by the DBMS for a recovery requirement triggered by a ROLLBACK statement, a program's abnormal termination, or a system failure such as a network discrepancy or a disk crash.
A) data dictionary
B) metadata
C) rollback manager
D) transaction log
A) data dictionary
B) metadata
C) rollback manager
D) transaction log
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
34
The transaction recovery write-ahead-log protocol ensures that transaction logs are always written before any database data are actually updated.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
35
A consistent database state is .
A) one in which all tables have foreign keys
B) one in which all data integrity constraints are satisfied
C) one in which all tables are normalized
D) one in which all SQL statements only update one table at a time
A) one in which all tables have foreign keys
B) one in which all data integrity constraints are satisfied
C) one in which all tables are normalized
D) one in which all SQL statements only update one table at a time
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
36
An optimistic approach is based on the assumption that the majority of the database operations do not conflict.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
37
requires that all operations of a transaction be completed.
A) Specificity
B) Atomicity
C) Durability
D) Time stamping
A) Specificity
B) Atomicity
C) Durability
D) Time stamping
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
38
The implicit beginning of a transaction is .
A) when the database is started
B) when a table is accessed for the first time
C) when the first SQL statement is encountered
D) when the COMMIT command is issued
A) when the database is started
B) when a table is accessed for the first time
C) when the first SQL statement is encountered
D) when the COMMIT command is issued
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
39
One of the three most common data integrity and consistency problems is .
A) lost updates
B) disk failures
C) user errors
D) deadlocks
A) lost updates
B) disk failures
C) user errors
D) deadlocks
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
40
ANSI defines four events that signal the end of a transaction. Of the following events, which is defined by ANSI as being equivalent to a COMMIT?
A) Five SQL statements are executed.
B) The end of a program is successfully reached.
C) The program is abnormally terminated.
D) The database is shut down for maintenance.
A) Five SQL statements are executed.
B) The end of a program is successfully reached.
C) The program is abnormally terminated.
D) The database is shut down for maintenance.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
41
A(n) lock has only two stages (0 and 1).
A) shared
B) exclusive
C) binary
D) two-phase
A) shared
B) exclusive
C) binary
D) two-phase
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
42
The isolation level ensures that queries return consistent results.
A) Read Uncommitted
B) Read Committed
C) Serializable
D) Repeatable Read
A) Read Uncommitted
B) Read Committed
C) Serializable
D) Repeatable Read
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
43
A lock locks the entire table preventing access to any row by a transaction while another transaction is using the table.
A) database-level
B) table-level
C) page-level
D) row-level
A) database-level
B) table-level
C) page-level
D) row-level
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
44
A(n) specifically reserves access to the transaction that locked the object.
A) shared lock
B) exclusive lock
C) binary lock
D) deadlock
A) shared lock
B) exclusive lock
C) binary lock
D) deadlock
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
45
Lock indicates the level of lock use.
A) granularity
B) shrinking
C) growing
D) serializability
A) granularity
B) shrinking
C) growing
D) serializability
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
46
The approach to scheduling concurrent transactions assigns a global unique stamp to each transaction.
A) scheduled
B) table-locking
C) unique
D) timestamping
A) scheduled
B) table-locking
C) unique
D) timestamping
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
47
A occurs when two or more transactions wait for each other to unlock data.
A) livelock
B) database deadlock
C) distributed deadlock
D) phantom deadlocks
A) livelock
B) database deadlock
C) distributed deadlock
D) phantom deadlocks
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
48
A(n) condition occurs when two or more transactions wait for each other to unlock data.
A) deadlock
B) exclusive lock
C) binary lock
D) two-phase lock
A) deadlock
B) exclusive lock
C) binary lock
D) two-phase lock
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
49
What is a rule that applies to the two-phase locking protocol?
A) Two transactions cannot have conflicting locks.
B) No unlock operation can precede a lock operation in a different transaction.
C) No data is affected until all locks are released.
D) No data is affected until the transaction is in its locked position.
A) Two transactions cannot have conflicting locks.
B) No unlock operation can precede a lock operation in a different transaction.
C) No data is affected until all locks are released.
D) No data is affected until the transaction is in its locked position.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
50
A diskpage, or page, is the equivalent of a .
A) database table
B) disk sector
C) database schema
D) diskblock
A) database table
B) disk sector
C) database schema
D) diskblock
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
51
are required to prevent another transaction from reading inconsistent data.
A) Locks
B) Schedules
C) Stamps
D) Logs
A) Locks
B) Schedules
C) Stamps
D) Logs
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
52
In the optimistic approach, during the phase, changes are permanently applied to the database.
A) read
B) validation
C) write
D) shared
A) read
B) validation
C) write
D) shared
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
53
A(n) phase in a two-phase lock is when a transaction releases all locks and cannot obtain any new lock.
A) growing
B) shrinking
C) locking
D) unlocking
A) growing
B) shrinking
C) locking
D) unlocking
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
54
A lock allows concurrent transactions to access different rows of the same table.
A) database-level
B) table-level
C) page-level
D) row-level
A) database-level
B) table-level
C) page-level
D) row-level
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
55
In the wait/die scheme,:
A) the older transaction rolls back the younger transaction and reschedules it.
B) the younger, preempted transaction is rescheduled using the same time stamp.
C) the older transaction waits for the younger one to complete and release its locks.
D) both the younger and older transactions wait indefinitely to be released.
A) the older transaction rolls back the younger transaction and reschedules it.
B) the younger, preempted transaction is rescheduled using the same time stamp.
C) the older transaction waits for the younger one to complete and release its locks.
D) both the younger and older transactions wait indefinitely to be released.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
56
A lock locks the entire diskpage.
A) transaction-level
B) table-level
C) page-level
D) row-level
A) transaction-level
B) table-level
C) page-level
D) row-level
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
57
A(n) lock exists when concurrent transactions are granted read access on the basis of a common lock.
A) shared
B) exclusive
C) binary
D) two-phase
A) shared
B) exclusive
C) binary
D) two-phase
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
58
In the optimistic approach, during the phase, a transaction scans the database, executes the needed computations, and makes the updates to a private copy of the database values.
A) read
B) validation
C) write
D) shared
A) read
B) validation
C) write
D) shared
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
59
The manager is responsible for assigning and policing the locks used by the transactions.
A) transaction
B) database
C) lock
D) schedule
A) transaction
B) database
C) lock
D) schedule
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
60
A lock prevents the use of any tables in the database from one transaction while another transaction is being processed.
A) database-level
B) table-level
C) page-level
D) row-level
A) database-level
B) table-level
C) page-level
D) row-level
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
61
Most multiuser automatically initiate and enforce locking procedures, where all locking information is managed by the lock manager.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
62
-level locks are less restrictive than database-level locks, but they create traffic jams when many transactions are waiting to access the same table.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
63
Although the DBMS is designed to recover a database to a previous consistent state when an interruption prevents the completion of a required set of transactions, the transactions themselves are defined by the end user or programmer and must be correct.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
64
A(n) occurs when a transaction executes a query at time t1, and then it runs the same query at time t2, yielding additional rows that satisfy the query.
A) phantom read
B) dirty read
C) uncommitted dependency
D) nonrepeatable read
A) phantom read
B) dirty read
C) uncommitted dependency
D) nonrepeatable read
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
65
The interleaves the execution of database operations to ensure serializability.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
66
Database transaction restores a database from an inconsistent state to a previously consistent state.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
67
If T1 has not unlocked data item Y, T2 cannot begin; if T2 has not unlocked data item X, T1 cannot continue. Consequently, T1 and T2 each wait for the other to unlock the required data item. Such a deadlock is also known as a(n) _____.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
68
What is transaction isolation and why it is important?
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
69
Uniqueness ensures that no equal time stamp values can exist, and ensures that time stamp values always increase.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
70
As a rule, a(n) must unlock the object after its termination.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
71
can take place at any of the following levels: database, table, page, row, or field.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
72
To determine the appropriate order of the operations, the scheduler bases its actions on concurrency control algorithms, such as or time stamping methods.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
73
The occurs when two concurrent transactions, T1 and T2, are updating the same data element and one of the updates is lost.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
74
The scheduler's main job is to create a(n) of a transaction's operation, in which the interleaved executions of transactions yield the same results as if the transactions were executed in serial order.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
75
The objective of control is to ensure the serializability of transactions in a multiuser database environment.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
76
If a(n) is issued before the termination of a transaction, the DBMS will restore the database only for that particular transaction, rather than for all transactions, in order to maintain the durability of the previous transactions.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
77
In a heavily used database management system (DBMS), the prevention and detection of constitutes an important DBMS function.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
78
ensure that a disk physical failure will not impair the DBMS's ability to recover data.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
79
control is important because the simultaneous execution of transactions over a shared database can create several data integrity and consistency problems.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck
80
The rule states that only one transaction at a time can own an exclusive lock on the same object.
Unlock Deck
Unlock for access to all 85 flashcards in this deck.
Unlock Deck
k this deck