File: introduction.html

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