<!-- Presentation generated by Internet Assistant for Microsoft PowerPoint 97 -->
<HTML>
<HEAD>
<meta name="GENERATOR" content="Microsoft Internet Assistant for Microsoft PowerPoint 97">
<TITLE>Transactions - Life Preservers</TITLE>
</HEAD>
<BODY >
<CENTER>
<TABLE WIDTH=100%>
<TR> <TD WIDTH=100% ALIGN=CENTER>
<A HREF="sld001.htm">First</A>
<A HREF="sld048.htm">Previous</A>
<A HREF="sld050.htm">Next</A>
<A HREF="sld096.htm">Last</A>
<A HREF="index.htm">Index</A>
<A HREF="dbi.perl.org">Home</A>
<A HREF="tsld049.htm">Text</A>
</TD> </TR>
<TR> <TD WIDTH=100% ALIGN=CENTER>
<IMG SRC="img049.gif" usemap="#Objmap" WIDTH=800 HEIGHT=600 BORDER=0>
</TD> </TR>
</TABLE>
<P>Slide 49 of 96</P>
</CENTER>
<!-- <UL>
<H2>Transactions - Life Preservers</H2>
</UL></P>
<P><UL>
<LI><H2>Text Book:
</H2>
<UL>
<LI>system crash between one bank account being debited and another being credited.
</UL></UL><UL>
<LI><H2>Dramatic:
</H2>
<UL>
<LI>power failure during update on 3 million rows when only part way through.
</UL></UL><UL>
<LI><H2>Real-world:
</H2>
<UL>
<LI>complex series of inter-related updates, deletes and inserts on many separate tables fails at the last step due to a duplicate unique key on an insert.
<LI>
</UL></UL><UL>
<LI><H2>Locking alone wont help you in any of these situations
</H2>
<UL>
<LI>(And locking with DBD::mysql < 2.1027 is unsafe due to auto reconnect)
</UL></UL><UL>
<LI><H2>Transaction recovery would handle all these situations - automatically
</H2>
<UL>
<LI>Makes a system far more robust and trustworthy over the long term.
</UL></UL><UL>
<LI><H2>Use transactions if your database supports them.
</H2>
<UL>
<LI>If it doesn't and you need them, switch to a different database.
</UL></UL><UL>
<H2>.</H2>
</UL></P>
<P> -->
</Body>
</HTML>