RDBMS Multiple Choice Questions on “Serializability”.
1. I and J are _________ if they are operations by different transactions on the same data item, and at least one of them is a write operation.
a) Conflicting
b) Overwriting
c) Isolated
d) Durable
Answer: a
Clarification: I and J are conflicting if they are operations by different transactions on the same data item, and at least one of them is a write operation.
2. If a schedule S can be transformed into a schedule S’ by a series of swaps of non-conflicting instructions, then S and S’ are
a) Non conflict equivalent
b) Equal
c) Conflict equivalent
d) Isolation equivalent
Answer: c
Clarification: If a schedule S can be transformed into a schedule S’ by a series of swaps of non-conflicting instructions, then S and S’ are conflict equivalent. Not all serial schedules are conflict equivalent to each other.
3. A schedule is __________ if it is conflict equivalent to a serial schedule.
a) Conflict serializable
b) Conflicting
c) Non serializable
d) None of the mentioned
Answer: a
Clarification: A schedule is conflict serializable if it is conflict equivalent to a serial schedule. The concept of conflict equivalence leads to the concept.
4. The set of ________ in a precedence graph consists of all the transactions participating in the schedule
a) Vertices
b) Edges
c) Directions
d) None of the mentioned
Answer: a
Clarification: The set of vertices in a precedence graph consists of all the transactions participating in the schedule. Precedence graph is a simple and efficient way of determining conflict serializability of the schedule.
5. A ___________of the transactions can be obtained by finding a linear order consistent with the partial order of the precedence graph.
a) Serializability order
b) Direction graph
c) Precedence graph
d) Scheduling scheme
Answer: a
Clarification: A Serializability order of the transactions can be obtained by finding a linear order consistent with the partial order of the precedence graph. This process is called as topological sorting.
6. State true or false: If I = read(Q) and J = read(Q) then the order of I and J does not matter.
a) True
b) False
Answer: a
Clarification: If I = read(Q) and J = read(Q) then the order of I and J does not matter because both I and J are read operations on the query.
7. State true or false: If I = read(Q) and J = write(Q) then the order of I and J does not matter.
a) True
b) False
Answer: b
Clarification: If I = read(Q) and J = write(Q) then the order of I and J matters because both I and J are different operations on the query. The order of execution determines the state of the database that is being read or written.
8. Which of the following is the most expensive method?
a) Timestamping
b) Plain locking
c) Predicate locking
d) Snapshot isolation
Answer: c
Clarification: Predicate locking is the most expensive method and is generally not used in most databases.
