RE: [PEAR-DEV] LDAP DB class

From: Date: Tue, 08 Jan 2002 17:00:28 +0000
Subject: RE: [PEAR-DEV] LDAP DB class
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-3835@lists.php.net to get a copy of this message
Yeah, I was fearing I would come to the same conclusion :( Obviously there are great differences in relational DB's compared to hirarchical DB's which probably can't be hidden very easily. I guess trying to make them as compatible as possible is the best bet. One other thing though. I guess I am not the first to think about something like this and I do not think its very easy to do as a general tool but: Maybe for the specialized tasks where people would use LDAP maybe a query builder would be a good solution. That is I pass the query builder a bunch of parameters and it either builds an SQL query or an LDAP query. A general query builder is quite hard to do but maybe with such a "limited" scope it because more feasible (or better doable). Best regards, Lukas Smith smith@dybnet.de _______________________________ DybNet Internet Solutions GbR Alt Moabit 89 10559 Berlin Germany Tel. : +49 30 83 22 50 00 Fax : +49 30 83 22 50 07 www.dybnet.de info@dybnet.de _______________________________ > -----Original Message----- > From: Ludovico Magnocavallo [mailto:ludo@sumatrasolutions.com] > Sent: Tuesday, January 08, 2002 5:50 PM > To: pear-dev@lists.php.net > Subject: Re: [PEAR-DEV] LDAP DB class > > Hi Lukas, > > I'm no great LDAP expert either, but I recently (well, yesterday) switched > to using PEAR DB classes and needed an LDAP implementation..... > > > I guess this would mean actually working off of an SQL query and parsing > > that to extract the parameters you need (like action etc) => leads to > > overhead > > LDAP syntax is very much different from SQL syntax, and even php LDAP > functions are very much different from php database functions. > > For example, you could perform a query on LDAP with ldap_search, > ldap_read, > ldap_list, all of which have the same interface, but perform different > queries against the LDAP server. Their interface is also different from db > functions, and some of the optional parameters would require a lot of > workarounds to be implemented in SQL syntax. > > I may be mistaken, but it would be a lot work to implement a SQL to LDAP > syntax parser, and it will give bad results, or very mediocre results. > > Another big difference in LDAP is that search results return only non- > empty > fields for each entry, so it's pretty hard to use them like you do for SQL > selects. > > I tried to maintain as much compatibility as I could, in fact I only added > a > few arguments to the simpleQuery method, and all other methods that depend > on it, and restricted the row methods to return an associative array. > > L. > > > > > > -- > PEAR Development Mailing List (http://pear.php.net/) > To unsubscribe, e-mail: pear-dev-unsubscribe@lists.php.net > For additional commands, e-mail: pear-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.pear.dev (#3835) next »