Transaction Processing & Concurrency Control 1)
Transaction Processing & Concurrency Control 1)
Which one of the schedules below is the correct serialization of the above?
a) T1->>T3->>T2
b) T2->>T1->>T3
c) T2->>T3->>T1
d) T3->>T1->>T2
Answer: (a)
13) Consider the following four schedules due to three transactions (indicated by the
subscript) using read and write on a data item x, denoted by r(x) and w(x) respectively,Which
one of them is conflict serializable?
Answer: (d)
14) Consider the following schedule S of transactions T1, T2, T3, T4:
a) Only S1 is conflict-serializable.
b) Only S2 is conflict-serializable.
c) Both S1 and S2 are conflict-serializable.
d) Neither S1 nor S2 is conflict-serializable.
Answer: (a)
16) Consider the following log sequence of two transactions on a bank account:
1. T1 start
2. T1 B old=12000 new=10000
3. T1 M old=0 new=2000
4. T1 commit
5. T2 start
6. T2 B old=10000 new=10500
7. T2 commit
Suppose the database system crashes just before log record 7 is written. When the system is
restarted, which one statement is true of the recovery procedure?
a) We must redo log record 6 to set B to 10500
b) We must undo log record 6 to set B to 10000 and then redo log records 2 and 3.
c) We need not redo log records 2 and 3 because transaction T1 has committed.
d) We can apply redo and undo operations in arbitrary order because they are idempotent
Answer: (b)
17) Which of the following scenarios may lead to an irrecoverable error in a database system?
a) A transaction writes a data item after it is read by an uncommitted transaction
b) A transaction reads a data item after it is read by an uncommitted transaction
c) A transaction reads a data item after it is written by a committed transaction
d) A transaction reads a data item after it is written by an uncommitted transaction
Answer: (d)
18) Which one of the following is NOT a part of the ACID properties of database transactions?
a) Atomicity
b) Consistency
c) Isolation
d) Deadlock-freedom
Answer: (d)
19) ACID properties of a transactions are:
a) Atomicity, consistency, isolation, database
b) Atomicity, consistency, isolation, durability
c) Atomicity, consistency, integrity, durability
d) Atomicity, consistency, integrity, database
Answer: (b)
20) Which of the following is the highest isolation level in transaction management?
a) Serializable
b) Repeated Read
c) Committed Read
d) Uncommitted Read
Answer: (a)
21) What is the equivalent serial schedule for the following transactions?
T1 T2 T3
R(Y)
R(Z)
R(X)
W(X)
W(Y)
W(Z)
W(Z)
R(Y)
W(Y)
R(Y)
W(Y)
R(X)
W(X)
a) T1 − T2 − T3
b) T3 − T1 − T2
c) T2 − T1 − T3
d) T1 − T3 − T2
Answer: (b)
22) Which of the following contains complete record of all activity that affected the contents
of a database during a certain period of time?
a) Transaction log
b) Query language
c) Report writer
d) Data manipulation language
Answer: (a)
23) Which of the following is correct with respect to Two phase commit protocol?
Ensures serializability
Prevents Deadlock
Detects Deadlock
Recover from Deadlock
Answer: (a)
24) A transaction state changes from active to______, after the transaction has been rolled
back and the database restored to its state prior to the start of the transaction.
a) Partially committed
b) Committed
c) Aborted
d) Failed
Answer: (c)
25) What is a schedule for a set of transactions?
a) It consists of all instructions of those transactions.
b) It preserve the order in which the instructions appear in each individual transaction.
c) Both a and b
d) None of these
Answer: (c)
26) A ROLLBACK statement will also release any existing savepoints that may not be in use.
a) True
b) False
Answer: (b)
27) What do you mean by atomicity?
a) When an update occurs to a database, either all or none of the update becomes available to
anyone
b) It determines how the transaction integrity will be visible to the other users and systems
c) The transactions have been committed and will survive permanently
d) All of the above
Answer: (a)