<?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>Berkeley DB Collections Tutorial</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 Collections Tutorial" /> <link rel="next" href="preface.html" title="Preface" /> </head> <body> <div xmlns="" class="navheader"> <div class="libver"> <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">Berkeley DB Collections Tutorial</th> </tr> <tr> <td width="20%" align="left"> </td> <th width="60%" align="center"> </th> <td width="20%" align="right"> <a accesskey="n" href="preface.html">Next</a></td> </tr> </table> <hr /> </div> <div class="book" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h1 class="title"><a id="idm140185754049440"></a>Berkeley DB Collections Tutorial</h1> </div> <div> <div class="legalnotice"> <a id="idm140185654488800"></a> <p class="legalnotice-title"> <b>Legal Notice</b> </p> <span> <p> This documentation is distributed under an open source license. You may review the terms of this license at: <a class="ulink" href="http://www.oracle.com/technetwork/database/berkeleydb/downloads/oslicense-093458.html" target="_top">http://www.oracle.com/technetwork/database/berkeleydb/downloads/oslicense-093458.html</a> </p> <p> Oracle, Berkeley DB, and Sleepycat are trademarks or registered trademarks of Oracle. All rights to these marks are reserved. No third-party use is permitted without the express prior written consent of Oracle. </p> <p> <span class="trademark">Java</span>™ and all Java-based marks are a trademark or registered trademark of Sun Microsystems, Inc, in the United States and other countries. </p> <p> Other names may be trademarks of their respective owners. </p> <p> To obtain a copy of this document's original source code, please submit a request to the Oracle Technology Network forum at: <a class="ulink" href="https://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">https://forums.oracle.com/forums/forum.jspa?forumID=271</a> </p> </span> </div> </div> <div> <p class="pubdate">5/13/2016</p> </div> </div> <hr /> </div> <div class="toc"> <p> <b>Table of Contents</b> </p> <dl> <dt> <span class="preface"> <a href="preface.html">Preface</a> </span> </dt> <dd> <dl> <dt> <span class="sect1"> <a href="preface.html#conventions">Conventions Used in this Book</a> </span> </dt> <dt> <span class="sect1"> <a href="moreinfo.html">For More Information</a> </span> </dt> <dd> <dl> <dt> <span class="sect2"> <a href="moreinfo.html#contact_us">Contact Us</a> </span> </dt> </dl> </dd> </dl> </dd> <dt> <span class="chapter"> <a href="intro.html">1. Introduction </a> </span> </dt> <dd> <dl> <dt> <span class="sect1"> <a href="intro.html#features">Features</a> </span> </dt> <dt> <span class="sect1"> <a href="developing.html">Developing a DB Collections Application</a> </span> </dt> <dt> <span class="sect1"> <a href="tutorialintroduction.html">Tutorial Introduction</a> </span> </dt> </dl> </dd> <dt> <span class="chapter"> <a href="BasicProgram.html">2. The Basic Program </a> </span> </dt> <dd> <dl> <dt> <span class="sect1"> <a href="BasicProgram.html#keyandvalueclasses"> Defining Serialized Key and Value Classes </a> </span> </dt> <dt> <span class="sect1"> <a href="opendbenvironment.html"> Opening and Closing the Database Environment </a> </span> </dt> <dt> <span class="sect1"> <a href="openclasscatalog.html"> Opening and Closing the Class Catalog </a> </span> </dt> <dt> <span class="sect1"> <a href="opendatabases.html"> Opening and Closing Databases </a> </span> </dt> <dt> <span class="sect1"> <a href="createbindingscollections.html"> Creating Bindings and Collections </a> </span> </dt> <dt> <span class="sect1"> <a href="implementingmain.html"> Implementing the Main Program </a> </span> </dt> <dt> <span class="sect1"> <a href="usingtransactions.html"> Using Transactions </a> </span> </dt> <dt> <span class="sect1"> <a href="addingdatabaseitems.html"> Adding Database Items </a> </span> </dt> <dt> <span class="sect1"> <a href="retrievingdatabaseitems.html"> Retrieving Database Items </a> </span> </dt> <dt> <span class="sect1"> <a href="handlingexceptions.html"> Handling Exceptions </a> </span> </dt> </dl> </dd> <dt> <span class="chapter"> <a href="UsingSecondaries.html">3. Using Secondary Indices </a> </span> </dt> <dd> <dl> <dt> <span class="sect1"> <a href="UsingSecondaries.html#opensecondaryindices"> Opening Secondary Key Indices </a> </span> </dt> <dt> <span class="sect1"> <a href="openingforeignkeys.html"> <span>More Secondary Key Indices</span> </a> </span> </dt> <dt> <span class="sect1"> <a href="indexedcollections.html"> Creating Indexed Collections </a> </span> </dt> <dt> <span class="sect1"> <a href="retrievingbyindexkey.html"> Retrieving Items by Index Key </a> </span> </dt> </dl> </dd> <dt> <span class="chapter"> <a href="Entity.html">4. Using Entity Classes </a> </span> </dt> <dd> <dl> <dt> <span class="sect1"> <a href="Entity.html#definingentityclasses"> Defining Entity Classes </a> </span> </dt> <dt> <span class="sect1"> <a href="creatingentitybindings.html"> Creating Entity Bindings </a> </span> </dt> <dt> <span class="sect1"> <a href="collectionswithentities.html"> Creating Collections with Entity Bindings </a> </span> </dt> <dt> <span class="sect1"> <a href="entitieswithcollections.html"> Using Entities with Collections </a> </span> </dt> </dl> </dd> <dt> <span class="chapter"> <a href="Tuple.html">5. Using Tuples </a> </span> </dt> <dd> <dl> <dt> <span class="sect1"> <a href="Tuple.html#tupleformat"> Using the Tuple Format </a> </span> </dt> <dt> <span class="sect1"> <a href="tupleswithkeycreators.html"> Using Tuples with Key Creators </a> </span> </dt> <dt> <span class="sect1"> <a href="tuplekeybindings.html"> Creating Tuple Key Bindings </a> </span> </dt> <dt> <span class="sect1"> <a href="tuple-serialentitybindings.html"> Creating Tuple-Serial Entity Bindings </a> </span> </dt> <dt> <span class="sect1"> <a href="sortedcollections.html"> Using Sorted Collections </a> </span> </dt> </dl> </dd> <dt> <span class="chapter"> <a href="SerializableEntity.html">6. Using Serializable Entities </a> </span> </dt> <dd> <dl> <dt> <span class="sect1"> <a href="SerializableEntity.html#transientfieldsinclass"> Using Transient Fields in an Entity Class </a> </span> </dt> <dt> <span class="sect1"> <a href="transientfieldsinbinding.html"> Using Transient Fields in an Entity Binding </a> </span> </dt> <dt> <span class="sect1"> <a href="removingredundantvalueclasses.html"> Removing the Redundant Value Classes </a> </span> </dt> </dl> </dd> <dt> <span class="chapter"> <a href="Summary.html">7. Summary </a> </span> </dt> <dt> <span class="appendix"> <a href="collectionOverview.html">A. API Notes and Details </a> </span> </dt> <dd> <dl> <dt> <span class="sect1"> <a href="collectionOverview.html#UsingDataBindings"> Using Data Bindings </a> </span> </dt> <dd> <dl> <dt> <span class="sect2"> <a href="collectionOverview.html#SelectingBindingFormats"> Selecting Binding Formats </a> </span> </dt> <dt> <span class="sect2"> <a href="collectionOverview.html#RecordNumberBindings">Record Number Bindings</a> </span> </dt> <dt> <span class="sect2"> <a href="collectionOverview.html#SelectingDataBindings"> Selecting Data Bindings </a> </span> </dt> <dt> <span class="sect2"> <a href="collectionOverview.html#ImplementingBindings"> Implementing Bindings </a> </span> </dt> <dt> <span class="sect2"> <a href="collectionOverview.html#UsingBindings"> Using Bindings </a> </span> </dt> <dt> <span class="sect2"> <a href="collectionOverview.html#SecondaryKeyCreators"> Secondary Key Creators </a> </span> </dt> </dl> </dd> <dt> <span class="sect1"> <a href="UsingCollectionsAPI.html"> Using the DB Java Collections API </a> </span> </dt> <dd> <dl> <dt> <span class="sect2"> <a href="UsingCollectionsAPI.html#UsingTransactions"> Using Transactions </a> </span> </dt> <dt> <span class="sect2"> <a href="UsingCollectionsAPI.html#TransactionRollback"> Transaction Rollback </a> </span> </dt> <dt> <span class="sect2"> <a href="UsingCollectionsAPI.html#SelectingAccessMethods">Selecting Access Methods</a> </span> </dt> <dt> <span class="sect2"> <a href="UsingCollectionsAPI.html#AccessMethodRestrictions"> Access Method Restrictions </a> </span> </dt> </dl> </dd> <dt> <span class="sect1"> <a href="UsingStoredCollections.html"> Using Stored Collections </a> </span> </dt> <dd> <dl> <dt> <span class="sect2"> <a href="UsingStoredCollections.html#StoredCollectionAccessMethods"> Stored Collection and Access Methods </a> </span> </dt> <dt> <span class="sect2"> <a href="UsingStoredCollections.html#StoredVersusStandardCollections"> Stored Collections Versus Standard Java Collections </a> </span> </dt> <dt> <span class="sect2"> <a href="UsingStoredCollections.html#StoredCollectionCharacteristics"> Other Stored Collection Characteristics </a> </span> </dt> <dt> <span class="sect2"> <a href="UsingStoredCollections.html#WhyJavaCollections"> Why Java Collections for Berkeley DB </a> </span> </dt> </dl> </dd> <dt> <span class="sect1"> <a href="SerializedObjectStorage.html"> Serialized Object Storage </a> </span> </dt> </dl> </dd> </dl> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"> </td> <td width="20%" align="center"> </td> <td width="40%" align="right"> <a accesskey="n" href="preface.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top"> </td> <td width="20%" align="center"> </td> <td width="40%" align="right" valign="top"> Preface</td> </tr> </table> </div> </body> </html>