The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

<!--  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>&nbsp;&nbsp;
         <A HREF="sld048.htm">Previous</A>&nbsp;&nbsp;
         <A HREF="sld050.htm">Next</A>&nbsp;&nbsp;
         <A HREF="sld096.htm">Last</A>&nbsp;&nbsp;
&nbsp;&nbsp;         <A HREF="index.htm">Index</A>&nbsp;&nbsp;
         <A HREF="dbi.perl.org">Home</A>&nbsp;&nbsp;
         <A HREF="tsld049.htm">Text</A>&nbsp;&nbsp;
     </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 won’t help you in any of these situations
</H2>
<UL>
<LI>(And locking with DBD::mysql &#060 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>