Book description
Small, special-purpose computing devices and high-end core Internet servers need fast, reliable database management. Berkeley DB is an embedded database that provides high-performance, scalable, transaction-protected and recoverable data management services to applications. Extremely portable, this library runs under almost all UNIX and Windows variants, as well as a number of embedded, real-time operating systems.
Berkeley DB is the ultimate resource for the world's most widely deployed embedded database engine. This book will aid software architects and engineers, product managers, and systems and network administrators without the overhead imposed by other database products.
Designed by programmers for programmers, this classic library style toolkit provides a broad base of functionality to application writers. This book will help you to make intelligent choices about when and how to use Berkeley DB to meet your needs.
You can visit the Sleepycat website to get the latest errata for this book.
NOTE: The first printing of this book contained an error in the table of contents that caused the page numbers to be off. This will be corrected in the second printing. If you have an earlier edition, you can download a pdf of the correct table of contents that you can print out and use with your book. If you have any questions, please feel free to contact the editor of this book at stephanie.wall@newriders.com.
Table of contents
- Copyright
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Tell Us What You Think
- Introduction
-
Reference Guide
- Introduction
- Getting Started: A Simple Tutorial
-
Access Method Configuration
- Btree
- Selecting an Access Method
- Logical Record Numbers
- Selecting a Page Size
- Selecting a Cache Size
- Selecting a Byte Order
- Non-Local Memory Allocation
- Btree Comparison
- Minimum Keys Per Page
- Retrieving Btree Records by Number
- Page Fill Factor
- Specifying a Database Hash
- Hash Table Size
- Managing Record-Based Databases
- Selecting a Queue Extent Size
- Flat-Text Backing Files
- Logically Renumbering Records
-
Access Method Operations
- Opening a Database
- Opening Multiple Databases in a Single File
- Upgrading Databases
- Retrieving Records
- Storing Records
- Deleting Records
- Flushing the Database Cache
- Database Statistics
- Closing a Database
- Database Cursors
- Retrieving Records with a Cursor
- Storing Records with a Cursor
- Deleting Records with a Cursor
- Duplicating a Cursor
- Logical Join
- Data Item Count
- Closing a Cursor
- Cursor Stability
- Database Verification and Salvage
- Access Method Wrap-Up
- Berkeley DB Architecture
- Berkeley DB Environment
- Berkeley DB Concurrent Data Store Applications
-
Berkeley DB Transactional Data Store Applications
- Why Transactions?
- Terminology
- Application Structure
- Opening the Environment
- Opening the Databases
- Recoverability and Deadlock Avoidance
- Atomicity
- Repeatable Reads
- Transactional Cursors
- Nested Transactions
- Environment Infrastructure
- Deadlock Detection
- Performing Checkpoints
- Database and Log File Archival Procedures
- Log File Removal
- Recovery Procedures
- Recovery and Filesystem Operations
- Berkeley DB Recoverability
- Transaction Throughput
- XA Resource Manager
- Programmer Notes
- The Locking Subsystem
- The Logging Subsystem
- The Memory Pool Subsystem
- The Transaction Subsystem
- RPC/Client Server
- Java API
- Tcl API
- Dumping and Reloading Databases
- Debugging Applications
- Building Berkeley DB for UNIX and QNX Systems
- Building Berkeley DB for Win32 Platforms
- Building Berkeley DB for VxWorks Systems
- Upgrading Berkeley DB Applications
- Test Suite
- Distribution
- Additional References
-
API Manual
-
C API
- DB→close
- DB→cursor
- DB→del
- DB→fd
- DB→get
- DB→get_byteswapped
- DB→get_type
- DB→join
- DB→key_range
- DB→open
- DB→put
- DB→remove
- DB→rename
- DB→set_append_recno
- DB→set_bt_compare
- DB→set_bt_minkey
- DB→set_bt_prefix
- DB→set_cachesize
- DB→set_dup_compare
- DB→set_errcall
- DB→set_errfile
- DB→set_errpfx
- DBset_feedback
- DB→set_flags
- DB→set_h_ffactor
- DB→set_h_hash
- DB→set_h_nelem
- DB→set_lorder
- DB→set_malloc
- DB→set_pagesize
- DB→set_paniccall
- DB→set_q_extentsize
- DB→set_re_delim
- DB→set_re_len
- DB→set_re_pad
- DB→set_re_source
- DB→set_realloc
- DB→stat
- DB→sync
- DB→upgrade
- DB→verify
- DBENV→close
- DBENV→err
- DBENV→open
- DBENV→remove
- DBENV→set_cachesize
- DBENV→set_data_dir
- DBENVset_errcall
- DBENV→set_errfile
- DBENV→set_errpfx
- DBENV→set_feedback
- DBENV→set_flags
- DBENV→set_lg_bsize
- DBENV→set_lg_dir
- DBENV→set_lg_max
- DBENV→set_lk_conflicts
- DBENV→set_lk_detect
- DBENV→set_lk_max
- DBENVset_lk_max_lockers
- DBENV→set_lk_max_locks
- DBENV→set_lk_max_objects
- DBENV→set_mp_mmapsize
- DBENV→set_paniccall
- DBENV→set_recovery_init
- DBENV→set_server
- DBENV→set_shm_key
- DBENV→set_tmp_dir
- DBENV→set_tx_max
- DBENV→set_tx_recover
- DBENV→set_tx_timestamp
- DBENV→set_verbose
- DBT
- DB_LSN
- DBcursor→c_close
- DBcursor→c_count
- DBcursor→c_del
- DBcursor→c_dup
- DBcursor→c_get
- DBcursor→c_put
- db_create
- db_env_create
- db_env_set_func_close
- db_env_set_func_dirfree
- db_env_set_func_dirlist
- db_env_set_func_exists
- db_env_set_func_free
- db_env_set_func_fsync
- db_env_set_func_ioinfo
- db_env_set_func_malloc
- db_env_set_func_map
- db_env_set_func_open
- db_env_set_func_read
- db_env_set_func_realloc
- db_env_set_func_rename
- db_env_set_func_seek
- db_env_set_func_sleep
- db_env_set_func_unlink
- db_env_set_func_unmap
- db_env_set_func_write
- db_env_set_func_yield
- DBENV→set_mutexlocks
- db_env_set_pageyield
- db_env_set_panicstate
- db_env_set_region_init
- db_env_set_tas_spins
- db_strerror
- db_version
- dbm/ndbm
- hsearch
- lock_detect
- lock_get
- lock_id
- lock_put
- lock_stat
- lock_vec
- log_archive
- log_compare
- log_file
- log_flush
- log_get
- log_put
- log_register
- log_stat
- log_unregister
- memp_fclose
- memp_fget
- memp_fopen
- memp_fput
- memp_fset
- memp_fsync
- memp_register
- memp_stat
- memp_sync
- memp_trickle
- txn_abort
- txn_begin
- txn_checkpoint
- txn_commit
- txn_id
- txn_prepare
- txn_stat
-
C++ API
- Db
- Db::close
- Db::cursor
- Db::del
- Db::fd
- Db::get
- Db::get_byteswapped
- Db::get_type
- Db::join
- Db::key_range
- Db::open
- Db::put
- Db::remove
- Db::rename
- b::set_append_recno
- Db::set_bt_compare
- Db::set_bt_minkey
- Db::set_bt_prefix
- Db::set_cachesize
- Db::set_dup_compare
- Db::set_errcall
- Db::set_errfile
- Db::set_errpfx
- Db::set_feedback
- Db::set_flags
- Db::set_h_ffactor
- Db::set_h_hash
- Db::set_h_nelem
- Db::set_lorder
- Db::set_malloc
- Db::set_pagesize
- Db::set_paniccall
- Db::set_q_extentsize
- Db::set_re_delim
- Db::set_re_len
- Db::set_re_pad
- Db::set_re_source
- Db::set_realloc
- Db::stat
- Db::sync
- Db::upgrade
- Db::verify
- DbEnv
- DbEnv::close
- DbEnv::err
- DbEnv::lock_detect
- DbEnv::lock_get
- DbEnv::lock_id
- DbEnv::lock_stat
- DbEnv::lock_vec
- DbEnv::log_archive
- DbEnv::log_compare
- DbEnv::log_file
- DbEnv::log_flush
- DbEnv::log_get
- DbEnv::log_put
- DbEnv::log_register
- DbEnv::log_stat
- DbEnv::log_unregister
- DbEnv::memp_register
- DbEnv::memp_stat
- DbEnv::memp_sync
- DbEnv::memp_trickle
- DbEnv::open
- DbEnv::remove
- DbEnv::set_cachesize
- DbEnv::set_data_dir
- DbEnv::set_errcall
- DbEnv::set_errfile
- DbEnv::set_error_stream
- DbEnv::set_errpfx
- DbEnv::set_feedback
- DbEnv::set_flags
- DbEnv::set_lg_bsize
- DbEnv::set_lg_dir
- DbEnv::set_lg_max
- DbEnv::set_lk_conflicts
- DbEnv::set_lk_detect
- DbEnv::set_lk_max
- DbEnv::set_lk_max_lockers
- DbEnv::set_lk_max_locks
- DbEnv::set_lk_max_objects
- DbEnv::set_mp_mmapsize
- DbEnv::set_mutexlocks
- DbEnv::set_pageyield
- DbEnv::set_paniccall
- DbEnv::set_panicstate
- DbEnv::set_recovery_init
- DbEnv::set_region_init
- DbEnv::set_server
- DbEnv::set_shm_key
- DbEnv::set_tas_spins
- DbEnv::set_tmp_dir
- DbEnv::set_tx_max
- DbEnv::set_tx_recover
- DbEnv::set_tx_timestamp
- DbEnv::set_verbose
- DbEnv::strerror
- DbEnv::txn_begin
- DbEnv::txn_checkpoint
- DbEnv::txn_stat
- DbEnv::version
- DbException
- DbException::get_errno
- DbException::what
- DbLock
- DbLock::put
- DbLsn
- DbMpoolFile
- DbMpoolFile::close
- DbMpoolFile::get
- DbMpoolFile::open
- DbMpoolFile::put
- DbMpoolFile::set
- DbMpoolFile::sync
- DbTxn
- DbTxn::abort
- DbTxn::commit
- DbTxn::id
- DbTxn::prepare
- Dbc
- Dbc::close
- Dbc::count
- Dbc::del
- Dbc::dup
- Dbc::get
- Dbc::put
- Dbt
-
Java API
- Db
- Db.close
- Db.cursor
- Db.del
- Db.fd
- Db.get
- Db.get_byteswapped
- Db.get_type
- Db.join
- Db.key_range
- Db.open
- Db.put
- Db.remove
- Db.rename
- Db.set_append_recno
- Db.set_bt_compare
- Db.set_bt_minkey
- Db.set_bt_prefix
- Db.set_cachesize
- Db.set_dup_compare
- Db.set_errcall
- Db.set_errpfx
- Db.set_feedback
- Db.set_flags
- Db.set_h_ffactor
- Db.set_h_hash
- Db.set_h_nelem
- Db.set_lorder
- Db.set_pagesize
- Db.set_q_extentsize
- Db.set_re_delim
- Db.set_re_len
- Db.set_re_pad
- Db.set_re_source
- Db.stat
- Db.sync
- Db.upgrade
- Db.verify
- DbDeadlockException
- DbEnv
- DbEnv.close
- DbEnv.get_version_major
- DbEnv.lock_detect
- DbEnv.lock_get
- DbEnv.lock_id
- DbEnv.lock_stat
- DbEnv.lock_vec
- DbEnv.log_archive
- DbEnv.log_compare
- DbEnv.log_file
- DbEnv.log_flush
- DbEnv.log_get
- DbEnv.log_put
- DbEnv.log_register
- DbEnv.log_stat
- DbEnv.log_unregister
- DbEnv.memp_register
- DbEnv.memp_stat
- DbEnv.memp_sync
- DbEnv.memp_trickle
- DbEnv.open
- DbEnv.remove
- DbEnv.set_cachesize
- DbEnv.set_data_dir
- DbEnv.set_errcall
- DbEnv.set_error_stream
- DbEnv.set_errpfx
- DbEnv.set_feedback
- DbEnv.set_flags
- DbEnv.set_lg_bsize
- DbEnv.set_lg_dir
- DbEnv.set_lg_max
- DbEnv.set_lk_conflicts
- DbEnv.set_lk_detect
- DbEnv.set_lk_max
- DbEnv.set_lk_max_lockers
- DbEnv.set_lk_max_locks
- DbEnv.set_lk_max_objects
- DbEnv.set_mp_mmapsize
- DbEnv.set_mutexlocks
- DbEnv.set_pageyield
- DbEnv.set_panicstate
- DbEnv.set_recovery_init
- DbEnv.set_region_init
- DbEnv.set_server
- DbEnv.set_shm_key
- DbEnv.set_tas_spins
- DbEnv.set_tmp_dir
- DbEnv.set_tx_max
- DbEnv.set_tx_recover
- DbEnv.set_tx_timestamp
- DbEnv.set_verbose
- DbEnv.strerror
- DbEnv.txn_begin
- DbEnv.txn_checkpoint
- DbEnv.txn_stat
- DbException
- DbException.get_errno
- DbLock
- DbLock.put
- DbLsn
- DbMemoryException
- DbMpoolFile.close
- DbMpoolFile.get
- DbMpoolFile.open
- DbMpoolFile.put
- DbMpoolFile.set
- DbMpoolFile.sync
- DbRunRecoveryException
- DbTxn
- DbTxn.abort
- DbTxn.commit
- DbTxn.id
- DbTxn.prepare
- Dbc
- Dbc.close
- Dbc.count
- Dbc.del
- Dbc.dup
- Dbc.get
- Dbc.put
- Dbt
- Tcl APIs
- Supporting Utilities
-
C API
Product information
- Title: Berkeley DB
- Author(s):
- Release date: June 2001
- Publisher(s): Sams
- ISBN: 0735710643
You might also like
book
The Berkeley DB Book
The Berkeley DB Book is a practical guide to the intricacies of the Berkeley DB. This …
book
Pro Oracle Database 11g RAC on Linux
Pro Oracle Database 11g RAC on Linux provides full-life-cycle guidance on implementing Oracle Real Application Clusters …
article
Run Llama-2 Models Locally with llama.cpp
Llama is Meta’s answer to the growing demand for LLMs. Unlike its well-known technological relative, ChatGPT, …
book
Securing NFS in AIX An Introduction to NFS v4 in AIX 5L Version 5.3
NFS Version 4 (NFS V4) is the latest defined client-to-server protocol for NFS. A significant upgrade …