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 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
|
<?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 to Berkeley DB</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" />
<link rel="up" href="index.html" title="Getting Started with Berkeley DB" />
<link rel="prev" href="moreinfo.html" title="For More Information" />
<link rel="next" href="javadplconcepts.html" title="Berkeley DB Concepts" />
</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 to Berkeley DB </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="javadplconcepts.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 to Berkeley DB </h2>
</div>
</div>
</div>
<div class="toc">
<p>
<b>Table of Contents</b>
</p>
<dl>
<dt>
<span class="sect1">
<a href="introduction.html#aboutthismanual">About This Manual</a>
</span>
</dt>
<dt>
<span class="sect1">
<a href="javadplconcepts.html">Berkeley DB Concepts</a>
</span>
</dt>
<dd>
<dl>
<dt>
<span class="sect2">
<a href="javadplconcepts.html#dplenvconcepts">Environments</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="javadplconcepts.html#key-data">Key-Data Pairs</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="javadplconcepts.html#storing-intro">Storing Data</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="javadplconcepts.html#duplicatesintro">Duplicate Data</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="javadplconcepts.html#replacedeleteIntro">Replacing and Deleting Entries</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="javadplconcepts.html#secondary">Secondary Keys</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="javadplconcepts.html#whichapi">Which API Should You Use?</a>
</span>
</dt>
</dl>
</dd>
<dt>
<span class="sect1">
<a href="accessmethods.html">Access Methods</a>
</span>
</dt>
<dd>
<dl>
<dt>
<span class="sect2">
<a href="accessmethods.html#selectAM">Selecting Access Methods</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="accessmethods.html#BTreeVSHash">Choosing between BTree and Hash</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="accessmethods.html#QueueVSRecno">Choosing between Queue and Recno</a>
</span>
</dt>
</dl>
</dd>
<dt>
<span class="sect1">
<a href="databaseLimits.html">Database Limits and Portability</a>
</span>
</dt>
<dt>
<span class="sect1">
<a href="coreExceptions.html">Exception Handling</a>
</span>
</dt>
<dt>
<span class="sect1">
<a href="returns.html">Error Returns</a>
</span>
</dt>
<dt>
<span class="sect1">
<a href="gettingit.html">Getting and Using DB </a>
</span>
</dt>
</dl>
</div>
<p>
Welcome to Berkeley DB (DB). DB is a general-purpose embedded
database engine that is capable of providing a wealth of data management services.
It is designed from the ground up for high-throughput applications requiring
in-process, bullet-proof management of mission-critical data. DB can
gracefully scale from managing a few bytes to terabytes of data. For the most
part, DB is limited only by your system's available physical resources.
</p>
<p>
You use DB through a series of programming APIs which give you the
ability to read and write your data, manage your database(s), and
perform other more advanced activities such as managing
transactions.
<span>
The Java APIs that you use to interact with DB
come in two basic flavors. The first is a high-level API that
allows you to make Java classes persistent. The second is a
lower-level API which provides additional flexibility when interacting
with DB databases.
</span>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
For long-time users of DB, the lower-level API is the
traditional API that you are probably accustomed to using.
</p>
</div>
<p>
Because DB is an embedded database engine, it is extremely fast. You compile
and link it into your application in the same way as you would any
third-party library. This means that DB runs in the same process space
as does your application, allowing you to avoid the high cost of
interprocess communications incurred by stand-alone database servers.
</p>
<p>
To further improve performance, DB offers an in-memory cache designed to
provide rapid access to your most frequently used data. Once configured,
cache usage is transparent. It requires very little attention on the part
of the application developer.
</p>
<p>
Beyond raw speed, DB is also extremely configurable. It provides several
different ways of organizing your data in its databases. Known as
<span class="emphasis"><em>access methods</em></span>, each such data organization mechanism
provides different characteristics that are appropriate for different data
management profiles. (Note that this manual focuses almost entirely on the
BTree access method as this is the access method used by the vast majority
of DB applications).
</p>
<p>
To further improve its configurability, DB offers many different
subsystems, each of which can be used to extend DB's capabilities. For
example, many applications require write-protection of their data so
as to ensure that data is never left in an inconsistent state for any
reason (such as software bugs or hardware failures). For those
applications, a transaction subsystem can be enabled and used to
transactional-protect database writes.
</p>
<p>
The list of operating systems on which DB is available is too long to
detail here. Suffice to say that it is available on all major commercial
operating systems, as well as on many embedded platforms.
</p>
<p>
Finally, DB is available in a wealth of programming languages.
DB is officially supported in C, C++, and Java, but the library is also
available in many other languages, especially scripting languages such as
Perl and Python.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
Before going any further, it is important to mention that DB is not
a relational database (although you could use it to build a relational
database). Out of the box, DB does not provide higher-level features
such as triggers, or a high-level query language such as SQL.
Instead, DB provides just those minimal
APIs required to store and retrieve your data as
efficiently as possible.
</p>
</div>
<div class="sect1" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a id="aboutthismanual"></a>About This Manual</h2>
</div>
</div>
</div>
<p>
This manual introduces DB. As such, this book does not examine
intermediate or advanced features such as threaded library usage or
transactional usage. Instead, this manual provides a step-by-step
introduction to DB's basic concepts and library usage.
</p>
<p>
Specifically, this manual introduces the high-level Java API
(the DPL), as well as the "base" Java API that the DPL
relies upon. Regardless of the API set that you choose to use, there are a
series of concepts and APIs that are common across the product.
This manual starts by providing a high-level examination of
DB. It then describes the APIs you use regardless of the API
set that you choose to use. It then provides information on using the
Direct Persistence Layer (DPL) API, followed by information on using
the more extensive "base" API.
</p>
<p>
Examples are given throughout this book that are designed to illustrate
API usage. At the end of each
<span>chapter or section in this book,</span>
a complete example is given that
is designed to reinforce the concepts covered in that
<span>chapter or section.</span>
In addition to being presented in this book, these final programs are also
available in the DB software distribution. You can find them in
</p>
<pre class="programlisting"><span class="emphasis"><em>DB_INSTALL</em></span>/examples_java/db/GettingStarted</pre>
<p>
where <code class="literal"><span class="emphasis"><em>DB_INSTALL</em></span></code> is the
location where you placed your DB distribution.
</p>
<p>
This book uses the Java programming languages for its examples.
Note that versions of this book exist for the C and C++ languages as
well.
</p>
</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="javadplconcepts.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"> Berkeley DB Concepts</td>
</tr>
</table>
</div>
</body>
</html>
|