2
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
4
<!--See the file LICENSE for redistribution information.-->
7
<title>Berkeley DB Reference Guide: Selecting a byte order</title>
8
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
9
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
12
<a name="2"><!--meow--></a>
13
<table width="100%"><tr valign=top>
14
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Access Methods</dl></h3></td>
15
<td align=right><a href="../../ref/am_conf/cachesize.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/am_conf/dup.html"><img src="../../images/next.gif" alt="Next"></a>
18
<h1 align=center>Selecting a byte order</h1>
19
<p>Database files created by Berkeley DB can be created in either little- or
20
big-endian formats. The byte order used for the underlying database
21
is specified by calling the <a href="../../api_c/db_set_lorder.html">DB->set_lorder</a> method. If no order
22
is selected, the native format of the machine on which the database is
24
<p>Berkeley DB databases are architecture independent, and any format database can
25
be used on a machine with a different native format. In this case, as
26
each page that is read into or written from the cache must be converted
27
to or from the host format, and databases with non-native formats will
28
incur a performance penalty for the run-time conversion.
29
<p><b>It is important to note that the Berkeley DB access methods do no data
30
conversion for application specified data. Key/data pairs written on a
31
little-endian format architecture will be returned to the application
32
exactly as they were written when retrieved on a big-endian format
34
<table width="100%"><tr><td><br></td><td align=right><a href="../../ref/am_conf/cachesize.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/am_conf/dup.html"><img src="../../images/next.gif" alt="Next"></a>
36
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>