11

As Mysql, sql server, postgre sql etc are basically different implementation of the same concept (rdbms), I am wondering does the same relationship exists between LDAP and MongoDB/CouchDB etc, or is there something more into LDAP?

Community
  • 1
  • 1
Itay Moav -Malimovka
  • 52,579
  • 61
  • 190
  • 278
  • They are considered wildly different things, but I've come across a few applications that used an LDAP server like a database, using the tree structure and integrating with users/groups, storing a lot of data in custom attributes. – Fosco Oct 16 '11 at 04:16
  • 2
    LDAP is similar to MongoDB because it does not have columns like a SQL database, but it is different because it is rigid : you need to follow a schema and a hierarchy, which is not meant to be change often. Read about [LDAP the forgotten NoSQL](http://www.engineyard.com/blog/2009/ldap-directories-the-forgotten-nosql/). – ixe013 Dec 18 '12 at 21:07
  • There are suggestions above that LDAP isn't transactional. I would have thought that was back end specific. OpenLDAP built against Berkeley DB can be transactional, and the backend BDB can backup from live 'snapshot' using standard CLI tools like tar, dd, etc... Transactional, threaded, multi-user are optional. Edit: also the underlying data in BDB is totally and completely schemaless. Just key value pairs. – 0x0065 Jun 29 '17 at 08:57

3 Answers3

13

LDAP

  • Hierarchical Database model (based on parent/child relationships, like in XML)
  • LDAP is appropriate for any kind of directory-like information, where fast lookups and less-frequent updates are the norm
  • Scalable
  • Standard protocol
  • Not suited for applications that require data integrity (banking, ecommerce, accounting). Traditionally is used to store users, groups, SSL certificates, service addresses, but is a generic database and can be used for any information.

MongoDb

  • Document oriented Database, based on BSON (JSON-like) documents
  • Key value database, but values can be BSON documents
  • High performance in both read and write operations
  • Scalable (Master-Slave replication)
  • Custom protocol
  • Not suited for applications that require data integrity (banking, ecommerce, accounting)

CouchDb

  • Document oriented Database, based on JSON documents
  • Key value database, but values can be JSON documents
  • High performance in both read and write operations
  • Scalable (Master-Master replication with conflict resolutions)
  • REST protocol
  • Not suited for applications that require data integrity (banking, ecommerce, accounting)
stivlo
  • 83,644
  • 31
  • 142
  • 199
  • 4
    I'm about a year too late in asking this, but why do you have the caveat of "Not suited for applications that require data integrity" on all of these? – Rob Dawson Aug 28 '12 at 05:47
  • @RobDawson They aren't transactional. (http://en.wikipedia.org/wiki/Database_transaction) – oori Oct 31 '14 at 22:37
  • 1
    It's true that MongoDB is not transactional, but it does provide several systems for durable writes, and is used at several banks. Full disclosure: I work at MongoDB. – Will Cross Mar 20 '15 at 19:13
  • 1
    Not fair to call LDAP a "custom protocol", unless IP/TCP/UDP/HTTP are also "custom protocols" - it is a published standard with several RFCs. – Phil Lello Mar 08 '16 at 13:38
  • @PhilLello you're right, let me fix the answer, thanks – stivlo Mar 09 '16 at 10:49
  • LDAP is not hierarchical database. It is an object network database. Any object in the system can point to another object. – SaSConsul Mar 16 '17 at 07:31
  • FYI, MongoDB is fully transactional since a couple years. Cheers – Simon Levesque Jun 06 '23 at 18:35
7

The most important thing, which differs LDAP databases from other noSQL, like MongoDB or CouchDB, is very flexible ACL system. For example, you can grant access to the object in the tree, using groups and users stored in the same tree. In fact, you can use objects itself to authenticate against the LDAP server.

IMHO, it is completely safe to allow clients to get access to the LDAP tree directly from the Internet without writing a string of code.

In the other hand, LDAP has a bit archaic design and uses sophisticated approaches to provide trivial operations. Mainly because of that fact, I'm slipping and dreaming, about someone implemented LDAP-like ACL in the any of modern noSQL database. Indeed, why making JSON-based database, if you cannot be authorized against it directly from the browser?

user145782
  • 91
  • 1
  • 2
4

SCHEMA is one of the biggest differences.
LDAP data stores have a single system-wide extendable schema (which in real-world, is the the Achilles heel of ldap servers replication...).
NO-SQL has 'no schema' (-or- any schema per object, look at it however you want..).

oori
  • 5,533
  • 1
  • 30
  • 37