je/docs/collections/tutorial/intro.html

206 lines
8 KiB
HTML
Raw Normal View History

2021-06-06 17:46:45 +00:00
<?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="Berkeley DB Java Edition Collections Tutorial" />
<link rel="up" href="index.html" title="Berkeley DB Java Edition Collections Tutorial" />
<link rel="prev" href="moreinfo.html" title="For More Information" />
<link rel="next" href="developing.html" title="Developing a JE Collections Application" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
<p>Library Version 12.2.7.5</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="developing.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="intro"></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="intro.html#features">Features</a>
</span>
</dt>
<dt>
<span class="sect1">
<a href="developing.html">Developing a JE Collections Application</a>
</span>
</dt>
<dt>
<span class="sect1">
<a href="tutorialintroduction.html">Tutorial Introduction</a>
</span>
</dt>
</dl>
</div>
<p>
The JE JE Collections API is a Java framework that extends
the well known
<a class="ulink" href="http://download.oracle.com/javase/1.5.0/docs/guide/collections/" target="_top">Java Collections</a>
design pattern such that collections can now be
stored, updated and queried in a transactional manner. The
JE JE Collections API is a layer on top of JE.
</p>
<p>
Together the JE JE Collections API and Berkeley DB Java Edition provide an
embedded data management solution with all the benefits of a full
transactional storage and the simplicity of a well known Java API.
Java programmers who need fast, scalable, transactional data
management for their projects can quickly adopt and deploy the
JE JE Collections API with confidence.
</p>
<p>
This framework was first known as
<a class="ulink" href="http://greybird-db.sourceforge.net/" target="_top">Greybird DB</a>
written by Mark Hayes. Mark collaborated with us to
permanently incorporate his excellent work into our distribution
and to support it as an ongoing part of Berkeley DB and Berkeley DB Java
Edition. The repository of source code that remains at SourceForge at version 0.9.0 is
considered the last version before incorporation and will remain
intact but will not be updated to reflect changes made as part of
Berkeley DB or Berkeley DB Java Edition.
</p>
<div class="sect1" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a id="features"></a>Features</h2>
</div>
</div>
</div>
<p>
<span>JE provides a Java API that can be roughly
described as a map and cursor interface, where the keys and values
are represented as byte arrays.</span>
The JE JE Collections API is a layer on top of
<span>JE.</span>
It adds significant new functionality in several ways.
</p>
<div class="itemizedlist">
<ul type="disc">
<li>
<p>
An implementation of the Java Collections interfaces (Map,
SortedMap, Set, SortedSet,
and Iterator) is provided.
</p>
</li>
<li>
<p>
Transactions are supported using the conventional Java
transaction-per-thread model, where the current transaction is
implicitly associated with the current thread.
</p>
</li>
<li>
<p>
Transaction runner utilities are provided that automatically
perform transaction retry and exception handling.
</p>
</li>
<li>
<p>
Keys and values are represented as Java objects rather than
byte arrays. Bindings are used to map between Java objects and the
stored byte arrays.
</p>
</li>
<li>
<p>
The tuple data format is provided as the simplest data
representation, and is useful for keys as well as simple compact
values.
</p>
</li>
<li>
<p>
The serial data format is provided for storing arbitrary Java
objects without writing custom binding code. Java serialization is
extended to store the class descriptions separately, making the
data records much more compact than with standard Java
serialization.
</p>
</li>
<li>
<p>
Custom data formats and bindings can be easily added. XML data
format and XML bindings could easily be created using this feature,
for example.
</p>
</li>
</ul>
</div>
<p>
Note that the JE JE Collections API does not support caching
of programming language objects nor does it keep track of their stored
status. This is in contrast to "persistent object" approaches such
as those defined by
<a class="ulink" href="http://www.odmg.org/odmg.html" target="_top">ODMG</a>
and JDO
(<a class="ulink" href="https://www.jcp.org/en/jsr/detail?id=1" target="_top">JSR 12</a>).
Such approaches have benefits but also require sophisticated object
caching. For simplicity the JE JE Collections API treats data
objects by value, not by reference, and does not perform object
caching of any kind. Since the JE JE Collections API is a thin
layer, its reliability and performance characteristics are roughly
equivalent to those of Berkeley DB, and database tuning is
accomplished in the same way as for any Berkeley DB database.
</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="developing.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"> Developing a JE Collections Application</td>
</tr>
</table>
</div>
</body>
</html>