• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/samba-3.5.8/docs-xml/manpages-3/
1<?xml version="1.0" encoding="iso-8859-1"?>
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
3<refentry id="ldb.3">
4
5<refmeta>
6	<refentrytitle>ldb</refentrytitle>
7	<manvolnum>3</manvolnum>
8	<refmiscinfo class="source">Samba</refmiscinfo>
9	<refmiscinfo class="manual">C Library Functions</refmiscinfo>
10	<refmiscinfo class="version">3.5</refmiscinfo>
11</refmeta>
12
13<refnamediv>
14	<refname>ldb</refname>
15	<refclass>The Samba Project</refclass>
16	<refpurpose>A light-weight database library</refpurpose>
17</refnamediv>
18
19<refsynopsisdiv>
20	<synopsis>#include &lt;ldb.h&gt;</synopsis>
21</refsynopsisdiv>
22
23<refsect1>
24	<title>description</title>
25
26	<para>
27ldb is a light weight embedded database library and API. With a
28programming interface that is very similar to LDAP, ldb can store its
29data either in a tdb(3) database or in a real LDAP database.
30	</para>
31
32	<para>
33When used with the tdb backend ldb does not require any database
34daemon. Instead, ldb function calls are processed immediately by the
35ldb library, which does IO directly on the database, while allowing
36multiple readers/writers using operating system byte range locks. This
37leads to an API with very low overheads, often resulting in speeds of
38more than 10x what can be achieved with a more traditional LDAP
39architecture.
40	</para>
41
42	<para>
43In a taxonomy of databases ldb would sit half way between key/value
44pair databases (such as berkley db or tdb) and a full LDAP
45database. With a structured attribute oriented API like LDAP and good
46indexing capabilities, ldb can be used for quite sophisticated
47applications that need a light weight database, without the
48administrative overhead of a full LDAP installation.
49	</para>
50
51	<para>
52Included with ldb are a number of useful command line tools for
53manipulating a ldb database. These tools are similar in style to the
54equivalent ldap command line tools.
55	</para>
56
57	<para>
58In its default mode of operation with a tdb backend, ldb can also be
59seen as a "schema-less LDAP". By default ldb does not require a
60schema, which greatly reduces the complexity of getting started with
61ldb databases. As the complexity of you application grows you can take
62advantage of some of the optional schema-like attributes that ldb
63offers, or you can migrate to using the full LDAP api while keeping
64your exiting ldb code.
65	</para>
66
67	<para>
68If you are new to ldb, then I suggest starting with the manual pages
69for ldbsearch(1) and ldbedit(1), and experimenting with a local
70database. Then I suggest you look at the ldb_connect(3) and
71ldb_search(3) manual pages.
72	</para>
73</refsect1>
74
75<refsect1>
76	<title>TOOLS</title>
77
78	<itemizedlist>
79		<listitem><para>
80			<application>ldbsearch(1)</application>
81			  - command line ldb search utility
82		</para></listitem>
83
84		<listitem><para>
85			<application>ldbedit(1)</application>
86			 - edit all or part of a ldb database using your favourite editor
87		</para></listitem>
88
89		<listitem><para>
90			<application>ldbadd(1)</application>
91			 - add records to a ldb database using LDIF formatted input
92		</para></listitem>
93
94		<listitem><para>
95			<application>ldbdel(1)</application>
96			 - delete records from a ldb database
97		</para></listitem>
98
99		<listitem><para>
100			<application>ldbmodify(1)</application>
101			 - modify records in a ldb database using LDIF formatted input
102		</para></listitem>
103	</itemizedlist>
104</refsect1>
105
106<refsect1>
107	<title>FUNCTIONS</title>
108
109	<itemizedlist>
110		<listitem><para>
111			<function>ldb_connect(3)</function>
112			 - connect to a ldb backend
113		</para></listitem>
114
115		<listitem><para>
116			<function>ldb_search(3)</function>
117			 - perform a database search
118		</para></listitem>
119
120		<listitem><para>
121			<function>ldb_add(3)</function>
122			 - add a record to the database
123		</para></listitem>
124
125		<listitem><para>
126			<function>ldb_delete(3)</function>
127			 - delete a record from the database
128		</para></listitem>
129
130		<listitem><para>
131			<function>ldb_modify(3)</function>
132			 - modify a record in the database
133		</para></listitem>
134
135		<listitem><para>
136			<function>ldb_errstring(3)</function>
137			 - retrieve extended error information from the last operation
138		</para></listitem>
139
140		<listitem><para>
141			<function>ldb_ldif_write(3)</function>
142			 - write a LDIF formatted message
143		</para></listitem>
144
145		<listitem><para>
146			<function>ldb_ldif_write_file(3)</function>
147			 - write a LDIF formatted message to a file
148		</para></listitem>
149
150		<listitem><para>
151			<function>ldb_ldif_read(3)</function>
152			 - read a LDIF formatted message
153		</para></listitem>
154
155		<listitem><para>
156			<function>ldb_ldif_read_free(3)</function>
157			 - free the result of a ldb_ldif_read()
158		</para></listitem>
159
160		<listitem><para>
161			<function>ldb_ldif_read_file(3)</function>
162			 - read a LDIF message from a file
163		</para></listitem>
164
165		<listitem><para>
166			<function>ldb_ldif_read_string(3)</function>
167			 - read a LDIF message from a string
168		</para></listitem>
169
170		<listitem><para>
171			<function>ldb_msg_find_element(3)</function>
172			 - find an element in a ldb_message
173		</para></listitem>
174
175		<listitem><para>
176			<function>ldb_val_equal_exact(3)</function>
177			 - compare two ldb_val structures
178		</para></listitem>
179
180		<listitem><para>
181			<function>ldb_msg_find_val(3)</function>
182			 - find an element by value
183		</para></listitem>
184
185		<listitem><para>
186			<function>ldb_msg_add_empty(3)</function>
187			 - add an empty message element to a ldb_message
188		</para></listitem>
189
190
191		<listitem><para>
192			<function>ldb_msg_add(3)</function>
193			 - add a non-empty message element to a ldb_message
194		</para></listitem>
195
196
197		<listitem><para>
198			<function>ldb_msg_element_compare(3)</function>
199			 - compare two ldb_message_element structures
200		</para></listitem>
201
202
203		<listitem><para>
204			<function>ldb_msg_find_int(3)</function>
205			 - return an integer value from a ldb_message
206		</para></listitem>
207
208
209		<listitem><para>
210			<function>ldb_msg_find_uint(3)</function>
211			 - return an unsigned integer value from a ldb_message
212		</para></listitem>
213
214
215		<listitem><para>
216			<function>ldb_msg_find_double(3)</function>
217			 - return a double value from a ldb_message
218		</para></listitem>
219
220
221		<listitem><para>
222			<function>ldb_msg_find_string(3)</function>
223			 - return a string value from a ldb_message
224		</para></listitem>
225
226
227		<listitem><para>
228			<function>ldb_set_alloc(3)</function>
229			 - set the memory allocation function to be used by ldb
230		</para></listitem>
231
232
233		<listitem><para>
234			<function>ldb_set_debug(3)</function>
235			 - set a debug handler to be used by ldb
236		</para></listitem>
237
238
239		<listitem><para>
240			<function>ldb_set_debug_stderr(3)</function>
241			 - set a debug handler for stderr output
242		</para></listitem>
243	</itemizedlist>
244</refsect1>
245
246<refsect1>
247	<title>Author</title>
248
249	<para>
250		ldb was written by 
251		 <ulink url="http://samba.org/~tridge/">Andrew Tridgell</ulink>.
252	</para>
253
254	<para>
255If you wish to report a problem or make a suggestion then please see
256the <ulink url="http://ldb.samba.org/"/> web site for
257current contact and maintainer information.
258	</para>
259
260	<para>
261ldb is released under the GNU Lesser General Public License version 2
262or later. Please see the file COPYING for license details.
263	</para>
264</refsect1>
265</refentry>
266