Solution (source code)

= Solution

A <serial database schedule> is obtained by running the three <database transactions> in the order $T_1,T_2,T_3$:
$$
\boxed{W_1(A),R_1(B),W_1(C),\ W_2(A),W_2(C),R_2(B),\ R_3(B),R_3(A),R_3(D).}
$$
A genuinely interleaved <conflict-serializable database schedule> with the same serial order is
$$
\boxed{W_1(A),R_3(B),R_1(B),W_1(C),W_2(A),W_2(C),R_2(B),R_3(A),R_3(D).}
$$
The early $R_3(B)$ conflicts with nothing: all accesses to $B$ are reads. The conflicts on $A$ give edges $T_1\to T_2$, $T_1\to T_3$ and $T_2\to T_3$ in the <database precedence graph>, while the writes to $C$ give the already present edge $T_1\to T_2$. This <database precedence graph> has no directed cycle and admits the order $T_1,T_2,T_3$. Moving the early $R_3(B)$ after $R_2(B)$ swaps it only past non-conflicting operations, recovering the displayed <serial database schedule>.

For a <database schedule> that is not a <conflict-serializable database schedule>, take
$$
\boxed{W_1(A),W_2(A),W_2(C),R_1(B),W_1(C),R_2(B),R_3(B),R_3(A),R_3(D).}
$$
On $A$, $W_1(A)$ before $W_2(A)$ forces $T_1\to T_2$. On $C$, $W_2(C)$ before $W_1(C)$ forces $T_2\to T_1$. The resulting directed cycle prevents any serial ordering from preserving all conflicts. Each of the three displayed <database schedules> preserves the operation order inside every <database transaction>.