Which of the following best describes conflict serializability in database transactions?
Think about how operations can be reordered without changing the final result.
Conflict serializability means that a schedule can be transformed into a serial schedule by swapping non-conflicting operations. This ensures the final database state is the same as if transactions ran one after another.
Given the following schedule of two transactions T1 and T2:
T1: R(A), W(A), R(B), W(B) T2: R(B), W(B), R(A), W(A)
Is this schedule conflict serializable?
Try drawing the precedence graph to check for cycles.
The schedule has conflicting operations on A and B that form a cycle in the precedence graph, so it is not conflict serializable.
Which statement correctly compares conflict serializability and view serializability?
Think about which type of serializability is more general.
Conflict serializability is a stricter condition. Every conflict serializable schedule is view serializable, but some view serializable schedules are not conflict serializable.
Consider two transactions T1 and T2 accessing data items X and Y. If T1 writes X before T2 reads X, and T2 writes Y before T1 reads Y, what does this imply about the schedule's conflict serializability?
Analyze the direction of conflicts and check for cycles.
Conflicting operations in opposite directions on different data items create a cycle in the precedence graph, making the schedule not conflict serializable.
Given two transactions T1 and T2, each with two operations: T1 performs R(A) then W(B), and T2 performs W(A) then R(B). How many possible schedules of these four operations are conflict serializable?
List all possible interleavings and check which have no cycles in their precedence graphs.
Out of all possible schedules, only 4 maintain conflict serializability because others create cycles due to conflicting operations on A and B.