1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6    <title>Chapter��1.��Introduction</title>
7    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
8    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9    <link rel="start" href="index.html" title="Getting Started with Berkeley DB Transaction Processing" />
10    <link rel="up" href="index.html" title="Getting Started with Berkeley DB Transaction Processing" />
11    <link rel="prev" href="preface.html" title="Preface" />
12    <link rel="next" href="sysfailure.html" title="A Note on System Failure" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">Chapter��1.��Introduction</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="preface.html">Prev</a>��</td>
22          <th width="60%" align="center">��</th>
23          <td width="20%" align="right">��<a accesskey="n" href="sysfailure.html">Next</a></td>
24        </tr>
25      </table>
26      <hr />
27    </div>
28    <div class="chapter" lang="en" xml:lang="en">
29      <div class="titlepage">
30        <div>
31          <div>
32            <h2 class="title"><a id="introduction"></a>Chapter��1.��Introduction</h2>
33          </div>
34        </div>
35      </div>
36      <div class="toc">
37        <p>
38          <b>Table of Contents</b>
39        </p>
40        <dl>
41          <dt>
42            <span class="sect1">
43              <a href="introduction.html#txnintro">Transaction Benefits</a>
44            </span>
45          </dt>
46          <dt>
47            <span class="sect1">
48              <a href="sysfailure.html">A Note on System Failure</a>
49            </span>
50          </dt>
51          <dt>
52            <span class="sect1">
53              <a href="apireq.html">Application Requirements</a>
54            </span>
55          </dt>
56          <dt>
57            <span class="sect1">
58              <a href="multithread-intro.html">Multi-threaded 
59        <span>and Multi-process</span>
60        Applications</a>
61            </span>
62          </dt>
63          <dt>
64            <span class="sect1">
65              <a href="recovery-intro.html">Recoverability</a>
66            </span>
67          </dt>
68          <dt>
69            <span class="sect1">
70              <a href="perftune-intro.html">Performance Tuning</a>
71            </span>
72          </dt>
73        </dl>
74      </div>
75      <p>
76    This book provides a thorough introduction and discussion on transactions as
77    used with Berkeley DB (DB). 
78    
79     
80        
81    It begins by offering a general overview to
82    transactions, the guarantees they provide, and the general application
83    infrastructure required to obtain full transactional protection for your
84    data. 
85  </p>
86      <p>
87    This book also provides detailed examples on how to write a
88    transactional application. Both single threaded and multi-threaded <span>(as well as multi-process
89    applications)</span> are discussed. A detailed description of various
90    backup and recovery strategies is included in this manual, as is a
91    discussion on performance considerations for your transactional application.
92  </p>
93      <p>
94    You should understand the concepts from the
95        <span>
96                <em class="citetitle">Getting Started with Berkeley DB</em>
97        </span>
98        
99        
100     guide before reading this book.
101  </p>
102      <div class="sect1" lang="en" xml:lang="en">
103        <div class="titlepage">
104          <div>
105            <div>
106              <h2 class="title" style="clear: both"><a id="txnintro"></a>Transaction Benefits</h2>
107            </div>
108          </div>
109        </div>
110        <p>
111        Transactions offer your application's data protection from
112        application or system failures.  That is, DB transactions offer 
113        your application full ACID support:
114    </p>
115        <div class="itemizedlist">
116          <ul type="disc">
117            <li>
118              <p>
119                <span class="bold"><strong>A</strong></span>tomicity
120            </p>
121              <p>
122                Multiple database operations are treated as a single unit of
123                work.  Once committed, all write operations performed under 
124                the protection of the transaction are saved to your databases.
125                Further, in the event that you abort a transaction, all write
126                operations performed during the transaction are discarded.
127                In this event, your database is left in the state it was in
128                before the transaction began, regardless of the number or
129                type of write operations you may have performed during the
130                course of the transaction.
131            </p>
132              <p>
133                Note that DB transactions can span one or more
134                database handles. 
135            </p>
136            </li>
137            <li>
138              <p>
139                <span class="bold"><strong>C</strong></span>onsistency
140            </p>
141              <p>
142                Your databases will never see a partially completed
143                transaction. This is true even if your application fails while there are
144                in-progress transactions. If the application or system fails,
145                then either all of the database changes appear when the
146                application next runs, or none of them appear.
147            </p>
148              <p>
149                In other words, whatever consistency requirements your application has will never be violated by DB.
150                If, for example, your application requires every record to include an employee ID, and your
151                code faithfully adds that ID to its database records, then DB will never
152                violate that consistency requirement. The ID will remain in the database records until such a time as your
153                application chooses to delete it.
154            </p>
155            </li>
156            <li>
157              <p>
158                <span class="bold"><strong>I</strong></span>solation
159            </p>
160              <p>
161                While a transaction is in progress, your databases will appear
162                to the transaction as if there are no other operations 
163                occurring outside of the transaction. That is, operations
164                wrapped inside a transaction will always have a clean and
165                consistent view of your databases. They never have to see
166                updates currently in progress under the protection of another transaction. 
167                Note, however, that isolation guarantees can be 
168                
169                 relaxed from the default setting.   See 
170                <a class="xref" href="isolation.html" title="Isolation">Isolation</a>
171                for more information.
172            </p>
173            </li>
174            <li>
175              <p>
176                <span class="bold"><strong>D</strong></span>urability
177            </p>
178              <p>
179                Once committed to your databases, your modifications will
180                persist even in the event of an application or system failure.
181                Note that like isolation, your durability guarantee can be
182                relaxed. See <a class="xref" href="usingtxns.html#nodurabletxn" title="Non-Durable Transactions">Non-Durable Transactions</a>
183                for more information.
184            </p>
185            </li>
186          </ul>
187        </div>
188      </div>
189    </div>
190    <div class="navfooter">
191      <hr />
192      <table width="100%" summary="Navigation footer">
193        <tr>
194          <td width="40%" align="left"><a accesskey="p" href="preface.html">Prev</a>��</td>
195          <td width="20%" align="center">��</td>
196          <td width="40%" align="right">��<a accesskey="n" href="sysfailure.html">Next</a></td>
197        </tr>
198        <tr>
199          <td width="40%" align="left" valign="top">Preface��</td>
200          <td width="20%" align="center">
201            <a accesskey="h" href="index.html">Home</a>
202          </td>
203          <td width="40%" align="right" valign="top">��A Note on System Failure</td>
204        </tr>
205      </table>
206    </div>
207  </body>
208</html>
209