1<!--$Id: toc.html,v 10.301 2008/05/05 05:22:43 alexg Exp $--> 2<html> 3<head> 4<title>Berkeley DB Reference Guide (Version: 4.7.25)</title> 5<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> 6<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++"> 7</head> 8<body bgcolor=white> 9 10<center> 11<h2><b>Berkeley DB Reference Guide, Version 4.7.25</b></h2> 12</center> 13 14<ol> 15<font size="+1"><li><a name="intro">Introduction</a></font> 16 <ol> 17 <li><a href="intro/data.html">An introduction to data management</a> 18 <li><a href="intro/terrain.html">Mapping the terrain: theory and practice</a> 19 <li><a href="intro/dbis.html">What is Berkeley DB?</a> 20 <li><a href="intro/dbisnot.html">What Berkeley DB is not</a> 21 <li><a href="intro/need.html">Do you need Berkeley DB?</a> 22 <li><a href="intro/what.html">What other services does Berkeley DB provide?</a> 23 <li><a href="intro/distrib.html">What does the Berkeley DB distribution include?</a> 24 <li><a href="intro/where.html">Where does Berkeley DB run?</a> 25 <li><a href="intro/products.html">The Berkeley DB products</a> 26 </ol> 27<font size="+1"><li><a name="am_conf">Access Method Configuration</a></font> 28 <ol> 29 <li><a href="am_conf/intro.html">What are the available access methods?</a> 30 <li><a href="am_conf/select.html">Selecting an access method</a> 31 <li><a href="am_conf/logrec.html">Logical record numbers</a> 32 <li>General access method configuration 33 <ol> 34 <li><a href="am_conf/pagesize.html">Selecting a page size</a> 35 <li><a href="am_conf/cachesize.html">Selecting a cache size</a> 36 <li><a href="am_conf/byteorder.html">Selecting a byte order</a> 37 <li><a href="am_conf/dup.html">Duplicate data items</a> 38 <li><a href="am_conf/malloc.html">Non-local memory allocation</a> 39 </ol> 40 <li>Btree access method specific configuration 41 <ol> 42 <li><a href="am_conf/bt_compare.html">Btree comparison</a> 43 <li><a href="am_conf/bt_prefix.html">Btree prefix comparison</a> 44 <li><a href="am_conf/bt_minkey.html">Minimum keys per page</a> 45 <li><a href="am_conf/bt_recnum.html"> 46 Retrieving Btree records by logical record number</a> 47 </ol> 48 <li>Hash access method specific configuration 49 <ol> 50 <li><a href="am_conf/h_ffactor.html">Page fill factor</a> 51 <li><a href="am_conf/h_hash.html">Specifying a database hash</a> 52 <li><a href="am_conf/h_nelem.html">Hash table size</a> 53 </ol> 54 <li>Queue and Recno access method specific configuration 55 <ol> 56 <li><a href="am_conf/recno.html">Managing record-based databases</a> 57 <li><a href="am_conf/extentsize.html">Selecting a Queue extent size</a> 58 <li><a href="am_conf/re_source.html">Flat-text backing files</a> 59 <li><a href="am_conf/renumber.html">Logically renumbering records</a> 60 </ol> 61 </ol> 62<font size="+1"><li><a name="am">Access Method Operations</a></font> 63 <ol> 64 <li><a href="am/ops.html">Access method operations</a> 65 <li><a href="am/open.html">Database open</a> 66 <li><a href="am/opensub.html">Opening multiple databases in a single file</a> 67 <li><a href="am/get.html">Retrieving records</a> 68 <li><a href="am/put.html">Storing records</a> 69 <li><a href="am/delete.html">Deleting records</a> 70 <li><a href="am/stat.html">Database statistics</a> 71 <li><a href="am/truncate.html">Database truncation</a> 72 <li><a href="am/upgrade.html">Database upgrade</a> 73 <li><a href="am/verify.html">Database verification and salvage</a> 74 <li><a href="am/sync.html">Flushing the database cache</a> 75 <li><a href="am/close.html">Database close</a> 76 <li><a href="am/second.html">Secondary indices</a> 77 <li><a href="am/cursor.html">Cursor operations</a> 78 <ol> 79 <li><a href="am/curget.html">Retrieving records with a cursor</a> 80 <li><a href="am/curput.html">Storing records with a cursor</a> 81 <li><a href="am/curdel.html">Deleting records with a cursor</a> 82 <li><a href="am/curdup.html">Duplicating a cursor</a> 83 <li><a href="am/join.html">Equality join</a> 84 <li><a href="am/count.html">Data item count</a> 85 <li><a href="am/curclose.html">Cursor close</a> 86 </ol> 87 </ol> 88<font size="+1"><li><a name="am_misc">Access Method Wrapup</a></font> 89 <ol> 90 <li><a href="am_misc/align.html">Data alignment</a> 91 <li><a href="am_misc/get_bulk.html">Retrieving records in bulk</a> 92 <li><a href="am_misc/partial.html">Partial record storage and retrieval</a> 93 <li><a href="am_misc/struct.html">Storing C/C++ structures/objects</a> 94 <li><a href="am_misc/perm.html">Retrieved key/data permanence for C/C++</a> 95 <li><a href="am_misc/error.html">Error support</a> 96 <li><a href="am_misc/stability.html">Cursor stability</a> 97 <li><a href="am_misc/dbsizes.html">Database limits</a> 98 <li><a href="am_misc/diskspace.html">Disk space requirements</a> 99 <li><a href="am_misc/tune.html">Access method tuning</a> 100 <li><a href="am_misc/faq.html">Access method FAQ</a> 101 </ol> 102<font size="+1"><li><a name="java">Java API</a></font> 103 <ol> 104 <li><a href="java/conf.html">Java configuration</a> 105 <li><a href="java/compat.html">Compatibility</a> 106 <li><a href="java/program.html">Java programming notes</a> 107 <li><a href="java/faq.html">Java FAQ</a> 108 </ol> 109<font size="+1"><li><a name="arch">Berkeley DB Architecture</a></font> 110 <ol> 111 <li><a href="arch/bigpic.html">The big picture</a> 112 <li><a href="arch/progmodel.html">Programming model</a> 113 <li><a href="arch/apis.html">Programmatic APIs</a> 114 <li><a href="arch/script.html">Scripting languages</a> 115 <li><a href="arch/utilities.html">Supporting utilities</a> 116 </ol> 117<font size="+1"><li><a name="env">The Berkeley DB Environment</a></font> 118 <ol> 119 <li><a href="env/intro.html">Database environment introduction</a> 120 <li><a href="env/create.html">Creating a database environment</a> 121 <li><a href="env/open.html">Opening databases within the environment</a> 122 <li><a href="env/error.html">Error support</a> 123 <li><a href="env/db_config.html">DB_CONFIG configuration file</a> 124 <li><a href="env/naming.html">File naming</a> 125 <li><a href="env/region.html">Shared memory regions</a> 126 <li><a href="env/security.html">Security</a> 127 <li><a href="env/encrypt.html">Encryption</a> 128 <li><a href="env/remote.html">Remote filesystems</a> 129 <li><a href="env/faq.html">Environment FAQ</a> 130 </ol> 131<font size="+1"><li><a name="cam">Berkeley DB Concurrent Data Store Applications</a></font> 132 <ol> 133 <li><a href="cam/intro.html">Concurrent Data Store introduction</a> 134 <li><a href="cam/fail.html">Handling failure in Data Store and Concurrent Data Store applications</a> 135 <li><a href="cam/app.html">Architecting Data Store and Concurrent Data Store applications</a> 136 </ol> 137<font size="+1"><li><a name="transapp">Berkeley DB Transactional Data Store Applications</a></font> 138 <ol> 139 <li><a href="transapp/intro.html">Transactional Data Store introduction</a> 140 <li><a href="transapp/why.html">Why transactions?</a> 141 <li><a href="transapp/term.html">Terminology</a> 142 <li><a href="transapp/fail.html">Handling failure in Transactional Data Store applications</a> 143 <li><a href="transapp/app.html">Architecting Transactional Data Store applications</a> 144 <li><a href="transapp/env_open.html">Opening the environment</a> 145 <li><a href="transapp/data_open.html">Opening the databases</a> 146 <li><a href="transapp/put.html">Recoverability and deadlock handling</a> 147 <li><a href="transapp/atomicity.html">Atomicity</a> 148 <li><a href="transapp/inc.html">Isolation</a> 149 <li><a href="transapp/read.html">Degrees of isolation</a> 150 <li><a href="transapp/cursor.html">Transactional cursors</a> 151 <li><a href="transapp/nested.html">Nested transactions</a> 152 <li><a href="transapp/admin.html">Environment infrastructure</a> 153 <li><a href="transapp/deadlock.html">Deadlock detection</a> 154 <li><a href="transapp/checkpoint.html">Checkpoints</a> 155 <li><a href="transapp/archival.html">Database and log file archival</a> 156 <li><a href="transapp/logfile.html">Log file removal</a> 157 <li><a href="transapp/recovery.html">Recovery procedures</a> 158 <li><a href="transapp/hotfail.html">Hot failover</a> 159 <li><a href="transapp/filesys.html">Recovery and filesystem operations</a> 160 <li><a href="transapp/reclimit.html">Berkeley DB recoverability</a> 161 <li><a href="transapp/tune.html">Transaction tuning</a> 162 <li><a href="transapp/throughput.html">Transaction throughput</a> 163 <li><a href="transapp/faq.html">Transaction FAQ</a> 164 </ol> 165<font size="+1"><li><a name="rep">Berkeley DB Replication</a></font> 166 <ol> 167 <li><a href="rep/intro.html">Replication introduction</a> 168 <li><a href="rep/id.html">Replication environment IDs</a> 169 <li><a href="rep/pri.html">Replication environment priorities</a> 170 <li><a href="rep/app.html">Building replicated applications</a> 171 <li><a href="rep/mgr_meth.html">Replication Manager methods</a> 172 <li><a href="rep/base_meth.html">Base replication API</a> 173 <li><a href="rep/comm.html">Building the communications infrastructure</a> 174 <li><a href="rep/newsite.html">Connecting to a new site</a> 175 <li><a href="rep/elect.html">Elections</a> 176 <li><a href="rep/mastersync.html">Synchronizing with a master</a> 177 <li><a href="rep/init.html">Initializing a new site</a> 178 <li><a href="rep/bulk.html">Bulk transfer</a> 179 <li><a href="rep/trans.html">Transactional guarantees</a> 180 <li><a href="rep/lease.html">Master leases</a> 181 <li><a href="rep/clock_skew.html">Clock skew</a> 182 <li><a href="rep/partition.html">Network partitions</a> 183 <li><a href="rep/faq.html">Replication FAQ</a> 184 <li><a href="rep/ex.html">Ex_rep: a replication example</a> 185 <li><a href="rep/ex_comm.html">Ex_rep_base: a TCP/IP based communication infrastructure</a> 186 <li><a href="rep/ex_rq.html">Ex_rep_base: putting it all together</a> 187 </ol> 188<font size="+1"><li><a name="xa">Distributed Transactions</a></font> 189 <ol> 190 <li><a href="xa/intro.html">Introduction to distributed transactions</a> 191 <li><a href="xa/build.html">Building a Global Transaction Manager</a> 192 <li><a href="xa/xa_intro.html">XA Introduction</a> 193 <li><a href="xa/xa_config.html">Configuring Berkeley DB with the Tuxedo System</a> 194 <li><a href="xa/faq.html">XA: Frequently Asked Questions</a> 195 </ol> 196<font size="+1"><li><a name="apprec">Application Specific Logging and Recovery</a></font> 197 <ol> 198 <li><a href="apprec/intro.html">Introduction to application specific logging and recovery</a> 199 <li><a href="apprec/def.html">Defining application-specific log records</a> 200 <li><a href="apprec/auto.html">Automatically generated functions</a> 201 <li><a href="apprec/config.html">Application configuration</a> 202 </ol> 203<font size="+1"><li><a name="program">Programmer Notes</a></font> 204 <ol> 205 <li><a href="program/appsignals.html">Signal handling</a> 206 <li><a href="program/errorret.html">Error returns to applications</a> 207 <li><a href="program/environ.html">Environmental variables</a> 208 <li><a href="program/mt.html">Multithreaded applications</a> 209 <li><a href="program/scope.html">Berkeley DB handles</a> 210 <li><a href="program/namespace.html">Name spaces</a> 211 <li><a href="program/ram.html">Memory-only or Flash configurations</a> 212 <li><a href="program/cache.html">Disk drive caches</a> 213 <li><a href="program/copy.html">Copying or moving databases</a> 214 <li><a href="program/compatible.html">Compatibility with historic UNIX interfaces</a> 215 <li><a href="program/runtime.html">Run-time configuration</a> 216 <li><a href="program/faq.html">Programmer notes FAQ</a> 217 </ol> 218<font size="+1"><li><a name="lock">The Locking Subsystem</a></font> 219 <ol> 220 <li><a href="lock/intro.html">Introduction to the locking subsystem</a> 221 <li><a href="lock/config.html">Configuring locking</a> 222 <li><a href="lock/max.html">Configuring locking: sizing the system</a> 223 <li><a href="lock/stdmode.html">Standard lock modes</a> 224 <li><a href="lock/dead.html">Deadlock detection</a> 225 <li><a href="lock/timeout.html">Deadlock detection using timers</a> 226 <li><a href="lock/deaddbg.html">Deadlock debugging</a> 227 <li><a href="lock/page.html">Locking granularity</a> 228 <li><a href="lock/notxn.html">Locking without transactions</a> 229 <li><a href="lock/twopl.html">Locking with transactions: two-phase locking</a> 230 <li><a href="lock/cam_conv.html">Berkeley DB Concurrent Data Store locking conventions</a> 231 <li><a href="lock/am_conv.html">Berkeley DB Transactional Data Store locking conventions</a> 232 <li><a href="lock/nondb.html">Locking and non-Berkeley DB applications</a> 233 </ol> 234<font size="+1"><li><a name="log">The Logging Subsystem</a></font> 235 <ol> 236 <li><a href="log/intro.html">Introduction to the logging subsystem</a> 237 <li><a href="log/config.html">Configuring logging</a> 238 <li><a href="log/limits.html">Log file limits</a> 239 </ol> 240<font size="+1"><li><a name="mp">The Memory Pool Subsystem</a></font> 241 <ol> 242 <li><a href="mp/intro.html">Introduction to the memory pool subsystem</a> 243 <li><a href="mp/config.html">Configuring the memory pool</a> 244 </ol> 245<font size="+1"><li><a name="txn">The Transaction Subsystem</a></font> 246 <ol> 247 <li><a href="txn/intro.html">Introduction to the transaction subsystem</a> 248 <li><a href="txn/config.html">Configuring transactions</a> 249 <li><a href="txn/limits.html">Transaction limits</a> 250 </ol> 251<font size="+1"><li><a name="sequence">Sequences</a></font> 252 <ol> 253 <li><a href="sequence/intro.html">Introduction to sequences</a> 254 </ol> 255<font size="+1"><li><a name="rpc">RPC Client/Server</a></font> 256 <ol> 257 <li><a href="rpc/intro.html">Introduction to the RPC client/server</a> 258 <li><a href="rpc/client.html">Client program</a> 259 <li><a href="rpc/server.html">Server program</a> 260 <li><a href="rpc/faq.html">RPC FAQ</a> 261 </ol> 262<font size="+1"><li><a name="tcl">Berkeley DB Extensions: Tcl</a></font> 263 <ol> 264 <li><a href="tcl/intro.html">Loading Berkeley DB with Tcl</a> 265 <li><a href="tcl/using.html">Using Berkeley DB with Tcl</a> 266 <li><a href="tcl/program.html">Tcl API programming notes</a> 267 <li><a href="tcl/error.html">Tcl error handling</a> 268 <li><a href="tcl/faq.html">Tcl FAQ</a> 269 </ol> 270<font size="+1"><li><a name="ext">Berkeley DB Extensions</a></font> 271 <ol> 272 <li><a href="ext/mod.html">Using Berkeley DB with Apache</a> 273 <li><a href="ext/perl.html">Using Berkeley DB with Perl</a> 274 <li><a href="ext/php.html">Using Berkeley DB with PHP</a> 275 </ol> 276<font size="+1"><li><a name="dumpload">Dumping and Reloading Databases</a></font> 277 <ol> 278 <li><a href="dumpload/utility.html">The db_dump and db_load utilities</a> 279 <li><a href="dumpload/format.html">Dump output formats</a> 280 <li><a href="dumpload/text.html">Loading text into databases</a> 281 </ol> 282<font size="+1"><li><a name="install">System Installation Notes</a></font> 283 <ol> 284 <li><a href="install/file.html">File utility /etc/magic information</a> 285 <li><a href="install/multiple.html">Building with multiple versions of Berkeley DB</a> 286 </ol> 287<font size="+1"><li><a name="debug">Debugging Applications</a></font> 288 <ol> 289 <li><a href="debug/intro.html">Introduction to debugging</a> 290 <li><a href="debug/compile.html">Compile-time configuration</a> 291 <li><a href="debug/runtime.html">Run-time error information</a> 292 <li><a href="debug/printlog.html">Reviewing Berkeley DB log files</a> 293 </ol> 294<font size="+1"><li><a name="build_brew">Building Berkeley DB for BREW</a></font> 295 <ol> 296 <li><a href="build_brew/intro.html">Building for BREW</a> 297 </ol> 298<font size="+1"><li><a name="build_brew">Building Berkeley DB for S60</a></font> 299 <ol> 300 <li><a href="build_s60/intro.html">Building for S60</a> 301 <li><a href="build_s60/notes.html">S60 notes</a> 302 </ol> 303<font size="+1"><li><a name="build_unix">Building Berkeley DB for UNIX/POSIX</a></font> 304 <ol> 305 <li><a href="build_unix/intro.html">Building for UNIX/POSIX</a> 306 <li><a href="build_unix/conf.html">Configuring Berkeley DB</a> 307 <li><a href="build_unix/small.html">Building a small memory footprint library</a> 308 <li><a href="build_unix/flags.html">Changing compile or load options</a> 309 <li><a href="build_unix/install.html">Installing Berkeley DB</a> 310 <li><a href="build_unix/shlib.html">Dynamic shared libraries</a> 311 <li><a href="build_unix/test.html">Running the test suite under UNIX</a> 312 <li><a href="build_unix/notes.html">Architecture independent FAQ</a> 313 <li>Architecture specific FAQs:<br> 314 <a href="build_unix/aix.html">AIX</a>, 315 <a href="build_unix/freebsd.html">FreeBSD</a>, 316 <a href="build_unix/hpux.html">HP-UX</a>, 317 <a href="build_unix/irix.html">IRIX</a>, 318 <a href="build_unix/linux.html">Linux</a>, 319 <a href="build_unix/macosx.html">Mac OS X</a>, 320 <a href="build_unix/osf1.html">OSF/1</a>, 321 <a href="build_unix/qnx.html">QNX</a>, 322 <a href="build_unix/sco.html">SCO</a>, 323 <a href="build_unix/solaris.html">Solaris</a>, 324 <a href="build_unix/sunos.html">SunOS</a>, 325 <a href="build_unix/ultrix.html">Ultrix</a> 326 </ol> 327<font size="+1"><li><a name="build_win">Building Berkeley DB for Windows</a></font> 328 <ol> 329 <li><a href="build_win/intro.html">Building for Windows</a> 330 <li><a href="build_win/small.html">Building a small memory footprint library</a> 331 <li><a href="build_win/test.html">Running the test suite under Windows</a> 332 <li><a href="build_win/notes.html">Windows notes</a> 333 <li><a href="build_win/faq.html">Windows FAQ</a> 334 </ol> 335<font size="+1"><li><a name="build_wince">Building Berkeley DB for Windows CE</a></font> 336 <ol> 337 <li><a href="build_wince/intro.html">Building for Windows CE</a> 338 <li><a href="build_wince/notes.html">Windows CE notes</a> 339 </ol> 340<font size="+1"><li><a name="build_vxworks">Building Berkeley DB for VxWorks</a></font> 341 <ol> 342 <li><a href="build_vxworks/intro.html">Building for VxWorks 5.4 and 5.5</a> 343 <li><a href="build_vxworks/intro6x.html">Building for VxWorks6.x</a> 344 <li><a href="build_vxworks/notes.html">VxWorks notes</a> 345 <li><a href="build_vxworks/faq.html">VxWorks FAQ</a> 346 </ol> 347<font size="+1"><li><a name="upgrade">Upgrading Berkeley DB Applications</a></font> 348 <ol> 349 <li><a href="upgrade/version.html">Library version information</a> 350 <li><a href="upgrade/process.html">Upgrading Berkeley DB installations</a> 351 <li><a href="changelog/toc.html">Berkeley DB Release Change Logs</a> 352 <li><a href="upgrade.2.0/toc.html"> 353 Upgrading Berkeley DB 1.85 and 1.86 applications to Berkeley DB 2.0</a> 354 <li><a href="upgrade.3.0/toc.html"> 355 Upgrading Berkeley DB 2.X applications to Berkeley DB 3.0</a> 356 <li><a href="upgrade.3.1/toc.html"> 357 Upgrading Berkeley DB 3.0 applications to Berkeley DB 3.1</a> 358 <li><a href="upgrade.3.2/toc.html"> 359 Upgrading Berkeley DB 3.1 applications to Berkeley DB 3.2</a> 360 <li><a href="upgrade.3.3/toc.html"> 361 Upgrading Berkeley DB 3.2 applications to Berkeley DB 3.3</a> 362 <li><a href="upgrade.4.0/toc.html"> 363 Upgrading Berkeley DB 3.3 applications to Berkeley DB 4.0</a> 364 <li><a href="upgrade.4.1/toc.html"> 365 Upgrading Berkeley DB 4.0 applications to Berkeley DB 4.1</a> 366 <li><a href="upgrade.4.2/toc.html"> 367 Upgrading Berkeley DB 4.1 applications to Berkeley DB 4.2</a> 368 <li><a href="upgrade.4.3/toc.html"> 369 Upgrading Berkeley DB 4.2 applications to Berkeley DB 4.3</a> 370 <li><a href="upgrade.4.4/toc.html"> 371 Upgrading Berkeley DB 4.3 applications to Berkeley DB 4.4</a> 372 <li><a href="upgrade.4.5/toc.html"> 373 Upgrading Berkeley DB 4.4 applications to Berkeley DB 4.5</a> 374 <li><a href="upgrade.4.6/toc.html"> 375 Upgrading Berkeley DB 4.5 applications to Berkeley DB 4.6</a> 376 <li><a href="upgrade.4.7/toc.html"> 377 Upgrading Berkeley DB 4.6 applications to Berkeley DB 4.7</a> 378 </ol> 379<font size="+1"><li><a name="test">Test Suite</a></font> 380 <ol> 381 <li><a href="test/run.html">Running the test suite</a> 382 <li><a href="test/faq.html">Test suite FAQ</a> 383 </ol> 384<font size="+1"><li><a name="distrib">Distribution</a></font> 385 <ol> 386 <li><a href="distrib/port.html">Porting Berkeley DB to new architectures</a> 387 <li><a href="distrib/layout.html">Source code layout</a> 388 </ol> 389<font size="+1"><li><a name="refs">Additional References</a></font> 390 <ol> 391 <li><a href="refs/refs.html">Additional references</a> 392 </ol> 393</ol> 394 395</body> 396</html> 397