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>Berkeley DB Collections Tutorial</title>
7    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
8    <meta name="generator" content="DocBook XSL Stylesheets V1.62.4" />
9    <link rel="home" href="index.html" title="Berkeley DB Collections Tutorial" />
10    <link rel="next" href="preface.html" title="Preface" />
11  </head>
12  <body>
13    <div class="navheader">
14      <table width="100%" summary="Navigation header">
15        <tr>
16          <th colspan="3" align="center">Berkeley DB Collections Tutorial</th>
17        </tr>
18        <tr>
19          <td width="20%" align="left"> </td>
20          <th width="60%" align="center"> </th>
21          <td width="20%" align="right"> <a accesskey="n" href="preface.html">Next</a></td>
22        </tr>
23      </table>
24      <hr />
25    </div>
26    <div class="book" lang="en" xml:lang="en">
27      <div class="titlepage">
28        <div>
29          <div>
30            <h1 class="title"><a id="id613728"></a>Berkeley DB Collections Tutorial</h1>
31          </div>
32          <div>
33            <div class="legalnotice">
34              <p class="legalnotice-title">
35                <b>Legal Notice</b>
36              </p>
37              <p>
38        This documentation is distributed under an open source license.
39        You may review the terms of this license at:
40        <a href="http://www.oracle.com/technology/software/products/berkeley-db/htdocs/oslicense.html" target="_top">http://www.oracle.com/technology/software/products/berkeley-db/htdocs/oslicense.html</a>
41        
42        
43    </p>
44              <p>
45            Oracle, Berkeley DB,
46            
47            
48            and
49            Sleepycat are trademarks or registered trademarks of
50            Oracle. All rights to these marks are reserved.
51            No third-party use is permitted without the
52            express prior written consent of Oracle.
53    </p>
54              <p>
55        <span class="trademark">Java</span>™ and all Java-based marks are a trademark
56        or registered trademark of Sun Microsystems,
57        Inc, in the United States and other countries.
58    </p>
59              <p>
60        To obtain a copy of this document's original source code, please
61        submit a request to the Oracle Technology Network forum at:
62        <a href="http://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">http://forums.oracle.com/forums/forum.jspa?forumID=271</a>
63        
64        
65    </p>
66            </div>
67          </div>
68          <div>
69            <p class="pubdate">4/25/2008</p>
70          </div>
71        </div>
72        <div></div>
73        <hr />
74      </div>
75      <div class="toc">
76        <p>
77          <b>Table of Contents</b>
78        </p>
79        <dl>
80          <dt>
81            <span class="preface">
82              <a href="preface.html">Preface</a>
83            </span>
84          </dt>
85          <dd>
86            <dl>
87              <dt>
88                <span class="sect1">
89                  <a href="preface.html#conventions">Conventions Used in this Book</a>
90                </span>
91              </dt>
92              <dt>
93                <span class="sect1">
94                  <a href="moreinfo.html">For More Information</a>
95                </span>
96              </dt>
97            </dl>
98          </dd>
99          <dt>
100            <span class="chapter">
101              <a href="intro.html">1. 
102        Introduction
103    </a>
104            </span>
105          </dt>
106          <dd>
107            <dl>
108              <dt>
109                <span class="sect1">
110                  <a href="intro.html#features">Features</a>
111                </span>
112              </dt>
113              <dt>
114                <span class="sect1">
115                  <a href="developing.html">Developing a DB Collections Application</a>
116                </span>
117              </dt>
118              <dt>
119                <span class="sect1">
120                  <a href="tutorialintroduction.html">Tutorial Introduction</a>
121                </span>
122              </dt>
123            </dl>
124          </dd>
125          <dt>
126            <span class="chapter">
127              <a href="BasicProgram.html">2. 
128		The Basic Program
129	</a>
130            </span>
131          </dt>
132          <dd>
133            <dl>
134              <dt>
135                <span class="sect1">
136                  <a href="BasicProgram.html#keyandvalueclasses">
137		Defining Serialized Key and Value Classes
138	</a>
139                </span>
140              </dt>
141              <dt>
142                <span class="sect1">
143                  <a href="opendbenvironment.html">
144		Opening and Closing the Database Environment
145	</a>
146                </span>
147              </dt>
148              <dt>
149                <span class="sect1">
150                  <a href="openclasscatalog.html">
151		Opening and Closing the Class Catalog
152	</a>
153                </span>
154              </dt>
155              <dt>
156                <span class="sect1">
157                  <a href="opendatabases.html">
158		Opening and Closing Databases
159	</a>
160                </span>
161              </dt>
162              <dt>
163                <span class="sect1">
164                  <a href="createbindingscollections.html">
165		Creating Bindings and Collections
166	</a>
167                </span>
168              </dt>
169              <dt>
170                <span class="sect1">
171                  <a href="implementingmain.html">
172		Implementing the Main Program
173	</a>
174                </span>
175              </dt>
176              <dt>
177                <span class="sect1">
178                  <a href="usingtransactions.html">
179		Using Transactions
180	</a>
181                </span>
182              </dt>
183              <dt>
184                <span class="sect1">
185                  <a href="addingdatabaseitems.html">
186		Adding Database Items
187	</a>
188                </span>
189              </dt>
190              <dt>
191                <span class="sect1">
192                  <a href="retrievingdatabaseitems.html">
193		Retrieving Database Items
194	</a>
195                </span>
196              </dt>
197              <dt>
198                <span class="sect1">
199                  <a href="handlingexceptions.html">
200		Handling Exceptions
201	</a>
202                </span>
203              </dt>
204            </dl>
205          </dd>
206          <dt>
207            <span class="chapter">
208              <a href="UsingSecondaries.html">3. 
209		Using Secondary Indices
210	</a>
211            </span>
212          </dt>
213          <dd>
214            <dl>
215              <dt>
216                <span class="sect1">
217                  <a href="UsingSecondaries.html#opensecondaryindices">
218		Opening Secondary Key Indices
219	</a>
220                </span>
221              </dt>
222              <dt>
223                <span class="sect1">
224                  <a href="openingforeignkeys.html">
225		
226		More Secondary Key Indices
227	</a>
228                </span>
229              </dt>
230              <dt>
231                <span class="sect1">
232                  <a href="indexedcollections.html">
233		Creating Indexed Collections
234	</a>
235                </span>
236              </dt>
237              <dt>
238                <span class="sect1">
239                  <a href="retrievingbyindexkey.html">
240		Retrieving Items by Index Key
241	</a>
242                </span>
243              </dt>
244            </dl>
245          </dd>
246          <dt>
247            <span class="chapter">
248              <a href="Entity.html">4. 
249        Using Entity Classes	
250	</a>
251            </span>
252          </dt>
253          <dd>
254            <dl>
255              <dt>
256                <span class="sect1">
257                  <a href="Entity.html#definingentityclasses">
258		Defining Entity Classes
259	</a>
260                </span>
261              </dt>
262              <dt>
263                <span class="sect1">
264                  <a href="creatingentitybindings.html">
265		Creating Entity Bindings
266	</a>
267                </span>
268              </dt>
269              <dt>
270                <span class="sect1">
271                  <a href="collectionswithentities.html">
272		Creating Collections with Entity Bindings
273	</a>
274                </span>
275              </dt>
276              <dt>
277                <span class="sect1">
278                  <a href="entitieswithcollections.html">
279		Using Entities with Collections
280	</a>
281                </span>
282              </dt>
283            </dl>
284          </dd>
285          <dt>
286            <span class="chapter">
287              <a href="Tuple.html">5. 
288		Using Tuples
289	</a>
290            </span>
291          </dt>
292          <dd>
293            <dl>
294              <dt>
295                <span class="sect1">
296                  <a href="Tuple.html#tupleformat">
297		Using the Tuple Format
298	</a>
299                </span>
300              </dt>
301              <dt>
302                <span class="sect1">
303                  <a href="tupleswithkeycreators.html">
304		Using Tuples with Key Creators
305	</a>
306                </span>
307              </dt>
308              <dt>
309                <span class="sect1">
310                  <a href="tuplekeybindings.html">
311		Creating Tuple Key Bindings
312	</a>
313                </span>
314              </dt>
315              <dt>
316                <span class="sect1">
317                  <a href="tuple-serialentitybindings.html">
318Creating Tuple-Serial Entity Bindings
319</a>
320                </span>
321              </dt>
322              <dt>
323                <span class="sect1">
324                  <a href="sortedcollections.html">
325		Using Sorted Collections
326	</a>
327                </span>
328              </dt>
329            </dl>
330          </dd>
331          <dt>
332            <span class="chapter">
333              <a href="SerializableEntity.html">6. 
334		Using Serializable Entities
335	</a>
336            </span>
337          </dt>
338          <dd>
339            <dl>
340              <dt>
341                <span class="sect1">
342                  <a href="SerializableEntity.html#transientfieldsinclass">
343		Using Transient Fields in an Entity Class
344	</a>
345                </span>
346              </dt>
347              <dt>
348                <span class="sect1">
349                  <a href="transientfieldsinbinding.html">
350		Using Transient Fields in an Entity Binding
351	</a>
352                </span>
353              </dt>
354              <dt>
355                <span class="sect1">
356                  <a href="removingredundantvalueclasses.html">
357		Removing the Redundant Value Classes
358	</a>
359                </span>
360              </dt>
361            </dl>
362          </dd>
363          <dt>
364            <span class="chapter">
365              <a href="Summary.html">7. 
366		Summary
367	</a>
368            </span>
369          </dt>
370          <dt>
371            <span class="appendix">
372              <a href="collectionOverview.html">A. 
373        API Notes and Details
374    </a>
375            </span>
376          </dt>
377          <dd>
378            <dl>
379              <dt>
380                <span class="sect1">
381                  <a href="collectionOverview.html#UsingDataBindings">
382        Using Data Bindings
383    </a>
384                </span>
385              </dt>
386              <dd>
387                <dl>
388                  <dt>
389                    <span class="sect2">
390                      <a href="collectionOverview.html#SelectingBindingFormats">
391            Selecting Binding Formats
392        </a>
393                    </span>
394                  </dt>
395                  <dt>
396                    <span class="sect2">
397                      <a href="collectionOverview.html#RecordNumberBindings">Record Number Bindings</a>
398                    </span>
399                  </dt>
400                  <dt>
401                    <span class="sect2">
402                      <a href="collectionOverview.html#SelectingDataBindings">
403            Selecting Data Bindings
404        </a>
405                    </span>
406                  </dt>
407                  <dt>
408                    <span class="sect2">
409                      <a href="collectionOverview.html#ImplementingBindings">
410            Implementing Bindings
411        </a>
412                    </span>
413                  </dt>
414                  <dt>
415                    <span class="sect2">
416                      <a href="collectionOverview.html#UsingBindings">
417            Using Bindings
418        </a>
419                    </span>
420                  </dt>
421                  <dt>
422                    <span class="sect2">
423                      <a href="collectionOverview.html#SecondaryKeyCreators">
424            Secondary Key Creators
425        </a>
426                    </span>
427                  </dt>
428                </dl>
429              </dd>
430              <dt>
431                <span class="sect1">
432                  <a href="UsingCollectionsAPI.html">
433        Using the DB Java Collections API
434    </a>
435                </span>
436              </dt>
437              <dd>
438                <dl>
439                  <dt>
440                    <span class="sect2">
441                      <a href="UsingCollectionsAPI.html#UsingTransactions">
442            Using Transactions
443        </a>
444                    </span>
445                  </dt>
446                  <dt>
447                    <span class="sect2">
448                      <a href="UsingCollectionsAPI.html#TransactionRollback">
449            Transaction Rollback
450        </a>
451                    </span>
452                  </dt>
453                  <dt>
454                    <span class="sect2">
455                      <a href="UsingCollectionsAPI.html#SelectingAccessMethods">Selecting Access Methods</a>
456                    </span>
457                  </dt>
458                  <dt>
459                    <span class="sect2">
460                      <a href="UsingCollectionsAPI.html#AccessMethodRestrictions">
461            Access Method Restrictions
462        </a>
463                    </span>
464                  </dt>
465                </dl>
466              </dd>
467              <dt>
468                <span class="sect1">
469                  <a href="UsingStoredCollections.html">
470        Using Stored Collections
471    </a>
472                </span>
473              </dt>
474              <dd>
475                <dl>
476                  <dt>
477                    <span class="sect2">
478                      <a href="UsingStoredCollections.html#StoredCollectionAccessMethods">
479            Stored Collection and Access Methods
480        </a>
481                    </span>
482                  </dt>
483                  <dt>
484                    <span class="sect2">
485                      <a href="UsingStoredCollections.html#StoredVersusStandardCollections">
486            Stored Collections Versus Standard Java Collections
487        </a>
488                    </span>
489                  </dt>
490                  <dt>
491                    <span class="sect2">
492                      <a href="UsingStoredCollections.html#StoredCollectionCharacteristics">
493            Other Stored Collection Characteristics
494        </a>
495                    </span>
496                  </dt>
497                  <dt>
498                    <span class="sect2">
499                      <a href="UsingStoredCollections.html#WhyJavaCollections">
500            Why Java Collections for Berkeley DB
501        </a>
502                    </span>
503                  </dt>
504                </dl>
505              </dd>
506              <dt>
507                <span class="sect1">
508                  <a href="SerializedObjectStorage.html">
509        Serialized Object Storage
510    </a>
511                </span>
512              </dt>
513            </dl>
514          </dd>
515        </dl>
516      </div>
517    </div>
518    <div class="navfooter">
519      <hr />
520      <table width="100%" summary="Navigation footer">
521        <tr>
522          <td width="40%" align="left"> </td>
523          <td width="20%" align="center"> </td>
524          <td width="40%" align="right"> <a accesskey="n" href="preface.html">Next</a></td>
525        </tr>
526        <tr>
527          <td width="40%" align="left" valign="top"> </td>
528          <td width="20%" align="center"> </td>
529          <td width="40%" align="right" valign="top"> Preface</td>
530        </tr>
531      </table>
532    </div>
533  </body>
534</html>
535