DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

Getting Started with Berkeley DB

Legal Notice

This documentation is distributed under the terms of the Sleepycat public license. You may review the terms of this license at: http://www.sleepycat.com/download/oslicense.html

Sleepycat Software, Berkeley DB, Berkeley DB XML and the Sleepycat logo are trademarks or service marks of Sleepycat Software, Inc. All rights to these marks are reserved. No third-party use is permitted without the express prior written consent of Sleepycat Software, Inc.

Java™ and all Java-based marks are a trademark or registered trademark of Sun Microsystems, Inc, in the United States and other countries.

To obtain a copy of this document's original source code, please write to .

11/9/2005


Table of Contents

Preface
Conventions Used in this Book
1. Introduction to Berkeley DB
About This Manual
Berkeley DB Concepts
Access Methods
Selecting Access Methods
Choosing between BTree and Hash
Choosing between Queue and Recno
Database Limits and Portability
Environments
Exception Handling
Error Returns
Getting and Using DB
2. Databases
Opening Databases
Closing Databases
Database Properties
Administrative Methods
Error Reporting Functions
Managing Databases in Environments
Database Example
3. Database Records
Using Database Records
Reading and Writing Database Records
Writing Records to the Database
Getting Records from the Database
Deleting Records
Data Persistence
Using the BIND APIs
Numerical and String Objects
Serializable Complex Objects
Custom Tuple Bindings
Database Usage Example
4. Using Cursors
Opening and Closing Cursors
Getting Records Using the Cursor
Searching for Records
Working with Duplicate Records
Putting Records Using Cursors
Deleting Records Using Cursors
Replacing Records Using Cursors
Cursor Example
5. Secondary Databases
Opening and Closing Secondary Databases
Implementing Key Creators
Secondary Database Properties
Reading Secondary Databases
Deleting Secondary Database Records
Using Secondary Cursors
Database Joins
Using Join Cursors
JoinCursor Properties
Secondary Database Example
Opening Secondary Databases with MyDbs
Using Secondary Databases with ExampleDatabaseRead
6. Database Configuration
Setting the Page Size
Overflow Pages
Locking
IO Efficiency
Page Sizing Advice
Selecting the Cache Size
BTree Configuration
Allowing Duplicate Records
Setting Comparison Functions

List of Examples

2.1. MyDbs Class
3.1. Inventory.java
3.2. Vendor.java
3.3. InventoryBinding.java
3.4. Stored Class Catalog Management with MyDbs
3.5. ExampleDatabaseLoad.java
4.1. ExampleDatabaseRead.java
5.1. ItemNameKeyCreator.java
5.2. SecondaryDatabase Management with MyDbs
5.3. SecondaryDatabase usage with ExampleDatabaseRead