Berkeley DB Programmer's Reference Guide
Legal Notice
This documentation is distributed under an open source license. You may review the terms of this license at: http://www.oracle.com/technetwork/database/berkeleydb/downloads/oslicense-093458.html
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.
Other names may be trademarks of their respective owners.
To obtain a copy of this document's original source code, please submit a request to the Oracle Technology Network forum at: http://forums.oracle.com/forums/forum.jspa?forumID=271
9/9/2013
Table of Contents
An introduction to data management
Mapping the terrain: theory and practice
Data access and data management
Berkeley DB is not a relational database
Berkeley DB is not an object-oriented database
Berkeley DB is not a network database
Berkeley DB is not a database server
What other services does Berkeley DB provide?
What does the Berkeley DB distribution include?
Berkeley DB Concurrent Data Store
Berkeley DB Transactional Data Store
2. Access Method Configuration
What are the available access methods?
General access method configuration
Btree access method specific configuration
Retrieving Btree records by logical record number
Hash access method specific configuration
Heap access method specific configuration
Queue and Recno access method specific configuration
Managing record-based databases
Opening multiple databases in a single file
Configuring databases sharing a file
Caching databases sharing a file
Locking in databases based on sharing a file
Database verification and salvage
Error Handling With Secondary Indexes
Retrieving records with a cursor
Deleting records with a cursor
Retrieving and updating records in bulk
Partial record storage and retrieval
Storing C/C++ structures/objects
Retrieved key/data permanence for C/C++
Specifying a Berkeley DB schema using SQL DDL
7. Standard Template Library API
Registering database and environment handles
Database and environment identity checks
Products, constructors and configurations
Using advanced Berkeley DB features with dbstl
Using bulk retrieval iterators
Using secondary index database and secondary containers
Using dbstl in multithreaded applications
Store and Retrieve data or objects of complex types
Storing varying length objects
Object life time and persistence
Dbstl container specific notes
Associative container specific notes
Special notes about trivial methods
Using correct container and iterator public types
9. The Berkeley DB Environment
Database environment introduction
Creating a database environment
Opening databases within the environment
Specifying file naming to Berkeley DB
Filename resolution in Berkeley DB
10. Berkeley DB Concurrent Data Store Applications
Concurrent Data Store introduction
Handling failure in Data Store and Concurrent Data Store applications
Architecting Data Store and Concurrent Data Store applications
11. Berkeley DB Transactional Data Store Applications
Transactional Data Store introduction
Handling failure in Transactional Data Store applications
Architecting Transactional Data Store applications
Recoverability and deadlock handling
Database and log file archival
Using Recovery on Journaling Filesystems
Recovery and filesystem operations
Replication environment priorities
Building replicated applications
Building the communications infrastructure
Managing Replication Manager Group Membership
Adding Sites to a Replication Group
Removing Sites from a Replication Group
Running Replication Manager in multiple processes
One replication process and multiple subordinate processes
Persistence of local site network address configuration
Running Replication using the db_replicate Utility
One Replication Process and Multiple Subordinate Processes
When to Consider an Integrated HA Application
Choosing a Replication Manager Ack Policy
Delaying client synchronization
Client-to-client synchronization
Clients too far out-of-date to synchronize
Using a token to check or wait for a transaction
Using Replication Manager message channels
Sending messages over a message channel
Special considerations for two-site replication groups
Ex_rep_base: a TCP/IP based communication infrastructure
Ex_rep_base: putting it all together
Ex_rep_chan: a Replication Manager channel example
Building a Global Transaction Manager
Communicating with multiple Berkeley DB environments
Managing the Global Transaction ID (GID) name space
Maintaining state for each distributed transaction.
Recovering from the failure of a single environment
Configuring Berkeley DB with the Tuxedo System
Update the Resource Manager File in Tuxedo
Build the Transaction Manager Server
Restrictions on XA Transactions
XA: Frequently Asked Questions
14. Application Specific Logging and Recovery
Introduction to application specific logging and recovery
Defining application-specific log records
Automatically generated functions
Memory-only or Flash configurations
Compatibility with historic UNIX interfaces
Introduction to the locking subsystem
Configuring locking: sizing the system
Deadlock detection using timers
Locking with transactions: two-phase locking
Berkeley DB Concurrent Data Store locking conventions
Berkeley DB Transactional Data Store locking conventions
Locking and non-Berkeley DB applications
Introduction to the logging subsystem
Introduction to the memory pool subsystem
Introduction to the transaction subsystem
21. Berkeley DB Extensions: Tcl
23. Dumping and Reloading Databases
The db_dump and db_load utilities
Technical Papers on Berkeley DB