### Berkeley DB Reference Guide: Transaction Protected Applications |

# Environment infrastructure

When building transactional applications, it is usually necessary to build an administrative infrastructure around the database environment. There are five components to this infrastructure, and each is supported by the Berkeley DB package in two different ways: a standalone utility and one or more library interfaces.

- Deadlock detection: db_deadlock, lock_detect, DBENV->set_lk_detect
- Checkpoints: db_checkpoint, txn_checkpoint
- Database and log file archival: db_archive, log_archive
- Log file removal: db_archive, log_archive
- Recovery procedures: db_recover, DBENV->open

When writing multi-threaded server applications and/or applications intended for download from the web, it is usually simpler to create local threads that are responsible for administration of the database environment as scheduling is often simpler in a single-process model, and only a single binary need be installed and run. However, the supplied utilities can be generally useful tools even when the application is responsible for doing its own administration, as applications rarely offer external interfaces to database administration. The utilities are required when programming to a Berkeley DB scripting interface, as the scripting APIs do not always offer interfaces to the administrative functionality.

Copyright Sleepycat Software