~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/docs/ref/am_conf/re_source.html

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!--$Id$-->
2
 
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
 
<!--All rights reserved.-->
4
 
<!--See the file LICENSE for redistribution information.-->
5
 
<html>
6
 
<head>
7
 
<title>Berkeley DB Reference Guide: Flat-text backing files</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++">
10
 
</head>
11
 
<body bgcolor=white>
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/extentsize.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/renumber.html"><img src="../../images/next.gif" alt="Next"></a>
16
 
</td></tr></table>
17
 
<p>
18
 
<h1 align=center>Flat-text backing files</h1>
19
 
<p>It is possible to back any Recno database (either fixed or variable
20
 
length) with a flat-text source file.  This provides fast read (and
21
 
potentially write) access to databases that are normally created and
22
 
stored as flat-text files.  The backing source file may be specified by
23
 
calling the <a href="../../api_c/db_set_re_source.html">DB-&gt;set_re_source</a> method.
24
 
<p>The backing source file will be read to initialize the database.  In the
25
 
case of variable length records, the records are assumed to be separated
26
 
as described for the <a href="../../api_c/db_set_re_delim.html">DB-&gt;set_re_delim</a> method interface.  For example,
27
 
standard UNIX byte stream files can be interpreted as a sequence of
28
 
variable length records separated by ASCII newline characters.  This is
29
 
the default.
30
 
<p>When cached data would normally be written back to the underlying
31
 
database file (for example, when the <a href="../../api_c/db_close.html">DB-&gt;close</a> or
32
 
<a href="../../api_c/db_sync.html">DB-&gt;sync</a> methods are called), the in-memory copy of the database will
33
 
be written back to the backing source file.
34
 
<p>The backing source file must already exist (but may be zero-length) when
35
 
<a href="../../api_c/db_open.html">DB-&gt;open</a> is called.  By default, the backing source file is read
36
 
lazily, that is, records are not read from the backing source file until
37
 
they are requested by the application. If multiple processes (not
38
 
threads) are accessing a Recno database concurrently and either
39
 
inserting or deleting records, the backing source file must be read in
40
 
its entirety before more than a single process accesses the database,
41
 
and only that process should specify the backing source file as part of
42
 
the <a href="../../api_c/db_open.html">DB-&gt;open</a> call.  This can be accomplished by calling the
43
 
<a href="../../api_c/db_set_flags.html">DB-&gt;set_flags</a> method with the <a href="../../api_c/db_set_flags.html#DB_SNAPSHOT">DB_SNAPSHOT</a> flag.
44
 
<p>Reading and writing the backing source file cannot be transactionally
45
 
protected because it involves filesystem operations that are not part of
46
 
the Berkeley DB transaction methodology. For this reason, if a temporary
47
 
database is used to hold the records (a NULL was specified as the file
48
 
argument to <a href="../../api_c/db_open.html">DB-&gt;open</a>), <b>it is possible to lose the
49
 
contents of the backing source file if the system crashes at the right
50
 
instant</b>. If a permanent file is used to hold the database (a filename
51
 
was specified as the file argument to <a href="../../api_c/db_open.html">DB-&gt;open</a>), normal database
52
 
recovery on that file can be used to prevent information loss.  It is
53
 
still possible that the contents of the backing source file itself will
54
 
be corrupted or lost if the system crashes.
55
 
<p>For all of the above reasons, the backing source file is generally used
56
 
to specify databases that are read-only for Berkeley DB applications, and that
57
 
are either generated on the fly by software tools, or modified using a
58
 
different mechanism such as a text editor.
59
 
<table width="100%"><tr><td><br></td><td align=right><a href="../../ref/am_conf/extentsize.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/renumber.html"><img src="../../images/next.gif" alt="Next"></a>
60
 
</td></tr></table>
61
 
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
62
 
</body>
63
 
</html>