• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/db-4.7.25.NC/docs/collections/tutorial/
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.��
7        Introduction
8    </title>
9    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
10    <meta name="generator" content="DocBook XSL Stylesheets V1.62.4" />
11    <link rel="home" href="index.html" title="Berkeley DB Collections Tutorial" />
12    <link rel="up" href="index.html" title="Berkeley DB Collections Tutorial" />
13    <link rel="previous" href="moreinfo.html" title="For More Information" />
14    <link rel="next" href="developing.html" title="Developing a DB Collections Application" />
15  </head>
16  <body>
17    <div class="navheader">
18      <table width="100%" summary="Navigation header">
19        <tr>
20          <th colspan="3" align="center">Chapter��1.��
21        Introduction
22    </th>
23        </tr>
24        <tr>
25          <td width="20%" align="left"><a accesskey="p" href="moreinfo.html">Prev</a>��</td>
26          <th width="60%" align="center">��</th>
27          <td width="20%" align="right">��<a accesskey="n" href="developing.html">Next</a></td>
28        </tr>
29      </table>
30      <hr />
31    </div>
32    <div class="chapter" lang="en" xml:lang="en">
33      <div class="titlepage">
34        <div>
35          <div>
36            <h2 class="title"><a id="intro"></a>Chapter��1.��
37        Introduction
38    </h2>
39          </div>
40        </div>
41        <div></div>
42      </div>
43      <div class="toc">
44        <p>
45          <b>Table of Contents</b>
46        </p>
47        <dl>
48          <dt>
49            <span class="sect1">
50              <a href="intro.html#features">Features</a>
51            </span>
52          </dt>
53          <dt>
54            <span class="sect1">
55              <a href="developing.html">Developing a DB Collections Application</a>
56            </span>
57          </dt>
58          <dt>
59            <span class="sect1">
60              <a href="tutorialintroduction.html">Tutorial Introduction</a>
61            </span>
62          </dt>
63        </dl>
64      </div>
65      <p>
66        The DB Java Collections API is a Java framework that extends
67        the well known 
68        <a href="http://java.sun.com/j2se/1.5.0/docs/guide/collections/" target="_top">Java Collections</a>
69        design pattern such that collections can now be
70        stored, updated and queried in a transactional manner. The
71        DB Java Collections API is a layer on top of DB.
72    </p>
73      <p>
74        Together the DB Java Collections API and Berkeley DB  provide an
75        embedded data management solution with all the benefits of a full
76        transactional storage and the simplicity of a well known Java API.
77        Java programmers who need fast, scalable, transactional data
78        management for their projects can quickly adopt and deploy the 
79        DB Java Collections API with confidence.
80    </p>
81      <p>
82        This framework was first known as 
83        <a href="http://greybird-db.sourceforge.net/" target="_top">Greybird DB</a>
84        written by Mark Hayes. Mark collaborated with us to
85        permanently incorporate his excellent work into our distribution
86        and to support it as an ongoing part of Berkeley DB and Berkeley DB Java
87        Edition. The repository of source code that remains at SourceForge at version 0.9.0 is
88        considered the last version before incorporation and will remain
89        intact but will not be updated to reflect changes made as part of
90        Berkeley DB or Berkeley DB Java Edition.
91    </p>
92      <div class="sect1" lang="en" xml:lang="en">
93        <div class="titlepage">
94          <div>
95            <div>
96              <h2 class="title" style="clear: both"><a id="features"></a>Features</h2>
97            </div>
98          </div>
99          <div></div>
100        </div>
101        <p>
102        <span>Berkeley DB has always provided a Java API which can be roughly
103        described as a map and cursor interface, where the keys and values
104        are represented as byte arrays. This API is a Java (JNI) interface
105        to the C API and it closely modeled the Berkeley DB C API's
106        interface.</span> 
107        
108         
109
110        The DB Java Collections API is a layer on top of 
111
112        <span>that
113        thin JNI mapping of the C API to Berkeley DB.</span>
114
115        
116        It adds significant new functionality in several ways.
117    </p>
118        <div class="itemizedlist">
119          <ul type="disc">
120            <li>
121              <p>
122                An implementation of the Java Collections interfaces (Map,
123                SortedMap, Set, SortedSet, 
124                <span>List</span> 
125                and Iterator) is provided.
126            </p>
127            </li>
128            <li>
129              <p>
130                Transactions are supported using the conventional Java
131                transaction-per-thread model, where the current transaction is
132                implicitly associated with the current thread.
133            </p>
134            </li>
135            <li>
136              <p>
137                Transaction runner utilities are provided that automatically
138                perform transaction retry and exception handling.
139            </p>
140            </li>
141            <li>
142              <p>
143                Keys and values are represented as Java objects rather than
144                byte arrays. Bindings are used to map between Java objects and the
145                stored byte arrays.
146            </p>
147            </li>
148            <li>
149              <p>
150                The tuple data format is provided as the simplest data
151                representation, and is useful for keys as well as simple compact
152                values.
153            </p>
154            </li>
155            <li>
156              <p>
157                The serial data format is provided for storing arbitrary Java
158                objects without writing custom binding code. Java serialization is
159                extended to store the class descriptions separately, making the
160                data records much more compact than with standard Java
161                serialization.
162            </p>
163            </li>
164            <li>
165              <p>
166                Custom data formats and bindings can be easily added. XML data
167                format and XML bindings could easily be created using this feature,
168                for example.
169            </p>
170            </li>
171            <li>
172              <p>
173                The DB Java Collections API insulates the application
174                from minor differences in the use of the Berkeley DB Data Store,
175                Concurrent Data Store, and Transactional Data Store products.
176                This allows for development with one and deployment with another
177                without significant changes to code.
178            </p>
179            </li>
180          </ul>
181        </div>
182        <p>
183        Note that the DB Java Collections API does not support caching
184        of programming language objects nor does it keep track of their stored
185        status. This is in contrast to "persistent object" approaches such
186        as those defined by 
187        <a href="http://www.odmg.org/" target="_top">ODMG</a>
188        and JDO
189        (<a href="http://www.jcp.org/en/jsr/detail?id=12" target="_top">JSR 12</a>).
190        Such approaches have benefits but also require sophisticated object
191        caching. For simplicity the DB Java Collections API treats data
192        objects by value, not by reference, and does not perform object
193        caching of any kind. Since the DB Java Collections API is a thin
194        layer, its reliability and performance characteristics are roughly
195        equivalent to those of Berkeley DB, and database tuning is
196        accomplished in the same way as for any Berkeley DB database.
197    </p>
198      </div>
199    </div>
200    <div class="navfooter">
201      <hr />
202      <table width="100%" summary="Navigation footer">
203        <tr>
204          <td width="40%" align="left"><a accesskey="p" href="moreinfo.html">Prev</a>��</td>
205          <td width="20%" align="center">
206            <a accesskey="u" href="index.html">Up</a>
207          </td>
208          <td width="40%" align="right">��<a accesskey="n" href="developing.html">Next</a></td>
209        </tr>
210        <tr>
211          <td width="40%" align="left" valign="top">For More Information��</td>
212          <td width="20%" align="center">
213            <a accesskey="h" href="index.html">Home</a>
214          </td>
215          <td width="40%" align="right" valign="top">��Developing a DB Collections Application</td>
216        </tr>
217      </table>
218    </div>
219  </body>
220</html>
221