ldb
ldb is a LDAP-like embedded database. It is not at all
LDAP
standards compliant, so if you want a standards compliant database then please
see the excellent OpenLDAP
project.
What ldb does is provide a fast database with an LDAP-like API
designed to be used within an application. In some ways it can be seen
as a intermediate solution between key-value pair databases and a real
LDAP database.
ldb is the database engine used in Samba4.
Features
The main features that separate ldb from other solutions are:
- Safe multi-reader, multi-writer, using byte range locking
- LDAP-like API
- fast operation
- choice of local tdb or remote LDAP backends
- integration with talloc
- schema-less operation, for trivial setup
- modules for extensions (such as schema support)
- easy setup of indexes and attribute properties
- LDIF for import/export
- ldbedit tool for database (via LDIF) editing (reminiscent of 'vipw')
Documentation
Currently ldb is completely lacking in programmer or user
documentation. This is your opportunity to make a contribution! Start
with the public functions declared in ldb.h
and the example code in the tools
directory. Documentation in the same docbook format used by Samba
would be preferred.
Discussion and bug reports
ldb does not currently have its own mailing list or bug tracking
system. For now, please use the samba-technical
mailing list or the ldb
mailing list, and the Samba bugzilla bug tracking system.
Download
You can download the latest release either via rsync or through git.
To fetch via git see the following guide:
Using Git for Samba Development
Once you have cloned the tree switch to the v4-0-test branch and cd into the source/lib/ldb directory.
To fetch via rsync use these commands:
rsync -Pavz samba.org::ftp/unpacked/ldb .
rsync -Pavz samba.org::ftp/unpacked/tdb .
rsync -Pavz samba.org::ftp/unpacked/talloc .
rsync -Pavz samba.org::ftp/unpacked/libreplace .
and build in ldb. It will find the other libraries in the directory
above automatically.
Andrew Tridgell
ldb AT tridgell.net