Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between SQL and LDAP

Tags:

I have used both SQL and LDAP, but in a recent conversation with one of my peers I came to realize that there may be more to it. And that it could be beneficial to consider LDAP over SQL at times.

So my challenge/request/question: Can you explain to me the advantages (and disadvantages) of LDAP over SQL "in the elevator". That is, a short 2-3 minutes presentation.

like image 717
Tedd Hansen Avatar asked Feb 22 '11 07:02

Tedd Hansen


People also ask

Is LDAP similar to SQL?

LDAP is an application layer protocol for accessing directory services ( MS Active Directory, OpenLDAP ). SQL is a language used to access relational databases ( MySQL, MSSQL ... )

Is LDAP SQL?

LDAP is a Communications protocol and SQL (Structured Query Language) is a special-purpose programming language designed for managing data in relational database management systems (RDBMS).

How is LDAP different from database?

LDAP is an application protocol which queries and modifies data by using directory services; a database is a collection of data with on or more uses. 2. LDAP sessions are instigated by clients who connect to the LDAP server; there are various database architectures which many databases use in concert with one another.

How does an SQL database differ from a directory service such as LDAP?

LDAP data is arranged in a Hierarchical fashion vs SQL which is data that is relational. For almost all comparable operations, LDAP server implementations are faster than most SQL server implementations.


1 Answers

LDAP is a protocol for accessing directories, SQL is a query language for databases.

Both systems store data, but the big difference is: directories (like Active Directory) are tuned towards a lot more reads than writes, e.g. reading information should be very easy, trivial indeed (and offer great performance), while updating can be a bit of a pain. Also: directories are often distributed, e.g. spread across multiple servers/locations, and offer mechanisms to easily replicate read-only data across locations.

SQL databases on the other hand are geared towards a more balanced load of read and write, and thus, writes must also be as easy as possible.

So this boils down to:

  • if you have data (like user accounts, permissions) that are mostly read (but not very often updated), then a directory sounds like a great solution

  • if you need to frequently insert new data and update existing data, then a database is much more suited to your needs. Don't try to create an order entry system inside a directory - it's a poor match.....

Those distinctions aren't "absolute" or clear - it's often a judgment call whether to put something into your database, or whether it belongs into a directory.

like image 72
marc_s Avatar answered Oct 02 '22 01:10

marc_s