1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
<! "@(#)put.so 10.3 (Sleepycat) 10/19/98">
<!Copyright 1997, 1998 by Sleepycat Software, Inc. All rights reserved.>
<html>
<body bgcolor=white>
<head>
<title>Berkeley DB Reference Guide: Access Methods</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btr
ee,hash,hashing,transaction,transactions,locking,logging,access method,access me
thods,java,C,C++">
</head>
<h3>Berkeley DB Reference Guide: Access Methods</h3>
<p>
<h1 align=center>Storing records</h1>
<p>
The <a href="../../api_c/Db/put.html">DB->put</a> function is the standard function for storing
records into the database. In general, the put function takes a
key and stores the associated data into the database.
<p>
There are a few flags that you can set to customize storage:
<dl compact>
<p><dt><a href="../../api_c/Db/put.html#DB_APPEND">DB_APPEND</a><dd>Simply append the data to the end of the database, treating the database
much like a simple log. This flag is only valid for the Recno access method.
<p><dt><a href="../../api_c/Db/put.html#DB_NOOVERWRITE">DB_NOOVERWRITE</a><dd>Only store the data item if the key does not already appear in the database.
</dl>
<p>
If the database has been configured to support duplicate records, the
<a href="../../api_c/Db/put.html">DB->put</a> function will add the new data value at the end of the
duplicate set. If the database supports sorted duplicates, the new data
value is inserted at the correct sorted location.
<p>
<a href="../../ref/am/get.html"><img src="../../images/prev.gif"></a>
<a href="../../ref/toc.html"><img src="../../images/toc.gif"></a>
<a href="../../ref/am/delete.html"><img src="../../images/next.gif"></a>
</tt>
</body>
</html>
|