(Answer) (Category) OpenLDAP Faq-O-Matic : (Category) General LDAP FAQ : (Category) Misc. : (Answer) Directories vs. Relational Database Management Systems
This question is raised many times in different forms. The most common, however, is: Why doesn't OpenLDAP drop Berkeley DB and use a relational database management system (RDBM) instead? In general, expecting that the sophisticated algorithms implemented by commercial-grade RDBM would make OpenLDAP be faster or somehow better and, at the same time, permitting sharing of data with other applications.

The short answer is that use of an embedded database and custom indexing system allows OpenLDAP to provide greater performance and scalability without loss of reliability. OpenLDAP, since release 2.1, in its main storage-oriented backends (back-bdb and, since 2.2, back-hdb) uses Berkeley DB concurrent / transactional database software. This is the same software used by leading commercial directory software.

Now for the long answer. We are all confronted all the time with the choice RDBMs vs. directories. It is a hard choice and no simple answer exists.










The second approach is to put the whole entry as a blob in a table shared by all entries regardless of the objectclass and have additional tables that act as indices for the first table. Index tables are not database indices, but are fully managed by the LDAP server-side implementation. This is exactly the approach used by the ldbm backend in slapd. However, the database becomes unusable from SQL. And, thus, a fully fledged database system provides little or no advantage. The full generality of the database is unneeded. Much better to use something light and fast, like Berkeley DB. And it is cheap, too.





For more information on concept and limitations, see slapd-sql(5) man page, or follow this link. There are also several examples for several RDBMSes in back-sql/rdbms_depend/* subdirectories.

back-sql is available since OpenLDAP 2.0.
mit@openldap.org, ando@sys-net.it

One of the Main Differences between LDAP and Database Solutions is, that LDAP actually is a "access protocol", therefore talking about the Wire Representation of Data. This is one of the Key Factors of making LDAP work on so many platforms and between so many applications. Also the Data Structures are "less" Table optimized. The designers made this well educated decision cause they know that the Access of Attributes and Searching/Browsing are different usage patterns.
Bernd Eckenfels www.eckes.org
This paper discusses how IBM uses DB2 in their enterprise directory solution.

[Append to This Answer]
Next: (Answer) Start TLS v. ldaps://
[Search] [Appearance]
This is a Faq-O-Matic 2.721.test.
© Copyright 1998-2013, OpenLDAP Foundation, info@OpenLDAP.org