| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 | <title>Chapter 9. The Berkeley DB Environment</title> |
| 7 | <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> |
| 8 | <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> |
| 9 | <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" /> |
| 10 | <link rel="up" href="index.html" title="Berkeley DB Programmer's Reference Guide" /> |
| 11 | <link rel="prev" href="arch_utilities.html" title="Supporting utilities" /> |
| 12 | <link rel="next" href="env_create.html" title="Creating a database environment" /> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div xmlns="" class="navheader"> |
| 16 | <div class="libver"> |
| 17 | <p>Library Version 11.2.5.3</p> |
| 18 | </div> |
| 19 | <table width="100%" summary="Navigation header"> |
| 20 | <tr> |
| 21 | <th colspan="3" align="center">Chapter 9. |
| 22 | The Berkeley DB Environment |
| 23 | </th> |
| 24 | </tr> |
| 25 | <tr> |
| 26 | <td width="20%" align="left"><a accesskey="p" href="arch_utilities.html">Prev</a> </td> |
| 27 | <th width="60%" align="center"> </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="env_create.html">Next</a></td> |
| 29 | </tr> |
| 30 | </table> |
| 31 | <hr /> |
| 32 | </div> |
| 33 | <div class="chapter" lang="en" xml:lang="en"> |
| 34 | <div class="titlepage"> |
| 35 | <div> |
| 36 | <div> |
| 37 | <h2 class="title"><a id="env"></a>Chapter 9. |
| 38 | The Berkeley DB Environment |
| 39 | </h2> |
| 40 | </div> |
| 41 | </div> |
| 42 | </div> |
| 43 | <div class="toc"> |
| 44 | <p> |
| 45 | <b>Table of Contents</b> |
| 46 | </p> |
| 47 | <dl> |
| 48 | <dt> |
| 49 | <span class="sect1"> |
| 50 | <a href="env.html#env_intro">Database environment introduction</a> |
| 51 | </span> |
| 52 | </dt> |
| 53 | <dt> |
| 54 | <span class="sect1"> |
| 55 | <a href="env_create.html">Creating a database environment</a> |
| 56 | </span> |
| 57 | </dt> |
| 58 | <dt> |
| 59 | <span class="sect1"> |
| 60 | <a href="env_size.html">Sizing a database environment</a> |
| 61 | </span> |
| 62 | </dt> |
| 63 | <dt> |
| 64 | <span class="sect1"> |
| 65 | <a href="env_open.html">Opening databases within the environment</a> |
| 66 | </span> |
| 67 | </dt> |
| 68 | <dt> |
| 69 | <span class="sect1"> |
| 70 | <a href="env_error.html">Error support</a> |
| 71 | </span> |
| 72 | </dt> |
| 73 | <dt> |
| 74 | <span class="sect1"> |
| 75 | <a href="env_db_config.html">DB_CONFIG configuration file</a> |
| 76 | </span> |
| 77 | </dt> |
| 78 | <dt> |
| 79 | <span class="sect1"> |
| 80 | <a href="env_naming.html">File naming</a> |
| 81 | </span> |
| 82 | </dt> |
| 83 | <dd> |
| 84 | <dl> |
| 85 | <dt> |
| 86 | <span class="sect2"> |
| 87 | <a href="env_naming.html#idp51749352">Specifying file naming to Berkeley DB</a> |
| 88 | </span> |
| 89 | </dt> |
| 90 | <dt> |
| 91 | <span class="sect2"> |
| 92 | <a href="env_naming.html#idp51763728">Filename resolution in Berkeley DB</a> |
| 93 | </span> |
| 94 | </dt> |
| 95 | <dt> |
| 96 | <span class="sect2"> |
| 97 | <a href="env_naming.html#idp51756464">Examples</a> |
| 98 | </span> |
| 99 | </dt> |
| 100 | </dl> |
| 101 | </dd> |
| 102 | <dt> |
| 103 | <span class="sect1"> |
| 104 | <a href="env_region.html">Shared memory regions</a> |
| 105 | </span> |
| 106 | </dt> |
| 107 | <dt> |
| 108 | <span class="sect1"> |
| 109 | <a href="env_security.html">Security</a> |
| 110 | </span> |
| 111 | </dt> |
| 112 | <dt> |
| 113 | <span class="sect1"> |
| 114 | <a href="env_encrypt.html">Encryption</a> |
| 115 | </span> |
| 116 | </dt> |
| 117 | <dt> |
| 118 | <span class="sect1"> |
| 119 | <a href="env_remote.html">Remote filesystems</a> |
| 120 | </span> |
| 121 | </dt> |
| 122 | <dt> |
| 123 | <span class="sect1"> |
| 124 | <a href="env_faq.html">Environment FAQ</a> |
| 125 | </span> |
| 126 | </dt> |
| 127 | </dl> |
| 128 | </div> |
| 129 | <div class="sect1" lang="en" xml:lang="en"> |
| 130 | <div class="titlepage"> |
| 131 | <div> |
| 132 | <div> |
| 133 | <h2 class="title" style="clear: both"><a id="env_intro"></a>Database environment introduction</h2> |
| 134 | </div> |
| 135 | </div> |
| 136 | </div> |
| 137 | <p>A Berkeley DB environment is an encapsulation of one or more databases, log |
| 138 | files and region files. Region files are the shared memory areas that |
| 139 | contain information about the database environment such as memory pool |
| 140 | cache pages. Only databases are byte-order independent and only |
| 141 | database files can be moved between machines of different byte orders. |
| 142 | Log files can be moved between machines of the same byte order. Region |
| 143 | files are usually unique to a specific machine and potentially to a |
| 144 | specific operating system release.</p> |
| 145 | <p>The simplest way to administer a Berkeley DB application environment is to |
| 146 | create a single <span class="bold"><strong>home</strong></span> directory that stores the files for the |
| 147 | applications that will share the environment. The environment home |
| 148 | directory must be created before any Berkeley DB applications are run. Berkeley DB |
| 149 | itself never creates the environment home directory. The environment can |
| 150 | then be identified by the name of that directory.</p> |
| 151 | <p>An environment may be shared by any number of processes, as well as by |
| 152 | any number of threads within those processes. It is possible for an |
| 153 | environment to include resources from other directories on the system, |
| 154 | and applications often choose to distribute resources to other |
| 155 | directories or disks for performance or other reasons. However, by |
| 156 | default, the databases, shared regions (the locking, logging, memory |
| 157 | pool, and transaction shared memory areas) and log files will be stored |
| 158 | in a single directory hierarchy.</p> |
| 159 | <p>It is important to realize that all applications sharing a database |
| 160 | environment implicitly trust each other. They have access to each |
| 161 | other's data as it resides in the shared regions, and they will share |
| 162 | resources such as buffer space and locks. At the same time, any |
| 163 | applications using the same databases <span class="bold"><strong>must</strong></span> share an environment |
| 164 | if consistency is to be maintained between them.</p> |
| 165 | <p>For more information on the operations supported by the database environment handle, see the <a href="../api_reference/C/env.html#envlist" class="olink">Database Environments and Related Methods</a> section in the <em class="citetitle">Berkeley DB C API Reference Guide.</em> </p> |
| 166 | </div> |
| 167 | </div> |
| 168 | <div class="navfooter"> |
| 169 | <hr /> |
| 170 | <table width="100%" summary="Navigation footer"> |
| 171 | <tr> |
| 172 | <td width="40%" align="left"><a accesskey="p" href="arch_utilities.html">Prev</a> </td> |
| 173 | <td width="20%" align="center"> </td> |
| 174 | <td width="40%" align="right"> <a accesskey="n" href="env_create.html">Next</a></td> |
| 175 | </tr> |
| 176 | <tr> |
| 177 | <td width="40%" align="left" valign="top">Supporting utilities </td> |
| 178 | <td width="20%" align="center"> |
| 179 | <a accesskey="h" href="index.html">Home</a> |
| 180 | </td> |
| 181 | <td width="40%" align="right" valign="top"> Creating a database environment</td> |
| 182 | </tr> |
| 183 | </table> |
| 184 | </div> |
| 185 | </body> |
| 186 | </html> |