Debian Codegraph @

docs/gsg_txn/JAVA/introduction.html

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