Re: SQL schema to LDAP schema ? - Mailing list pgsql-general

From scott.marlowe
Subject Re: SQL schema to LDAP schema ?
Date
Msg-id Pine.LNX.4.33.0304280857290.2646-100000@css120.ihs.com
Whole thread Raw
In response to SQL schema to LDAP schema ?  (Jerome Alet <alet@librelogiciel.com>)
Responses Re: SQL schema to LDAP schema ?  (Jerome Alet <alet@librelogiciel.com>)
List pgsql-general
On Sat, 26 Apr 2003, Jerome Alet wrote:

> Hi,
>
> I've implemented a tool which actually uses PostgreSQL as the
> backend, but some people ask me for an LDAP backend too.
>
> Unfortunately I don't know how to create and LDAP directory, so
> I wondered if any of you know of a tool which would take a
> set of PostgreSQL commands or an existing PostgreSQL database
> and would dump the SQL schema in a form reuseable to
> create an LDAP directory with the same functionnalities.
>
> I've already read some doc on creating an LDAP schema from
> an existing realtionnal database, but it is actually still
> very obscure to me...
>
> Any link or help appreciated.

We pump a Postgresql database to produce LDAP records and then insert them
directly into the LDAP server.

Basically, LDAP is a non-relational database, it is hierarchical (sp?) if
I remember correctly.  So, there's often no direct mapping from Postgresql
to LDAP for everything you want.  Also, the schema in LDAP is well
defined, and much of it is pre-defined before you get it.  You might find
yourself needing to create your own schema objects, not a simple task in
LDAP, but not as hard as you may have been led to believe.

One thing to look at is OpenLDAP 2.1, which now officially supports
Postgresql as it's official SQL backend.  If you got that up and running,
it might give a nice window into the way OpenLDAP uses Postgresql as a
datastore and offer up some clues on how to do some of this.

If you just need a script to grab data from Postgresql and get it into
LDAP, I can help, but all our code to do that is in PHP, so you'll either
need to set up that language or convert it into Perl or something a little
more ubiquitous.


pgsql-general by date:

Previous
From: "Ivan"
Date:
Subject: encrypt/decrypt problem
Next
From: "scott.marlowe"
Date:
Subject: Re: why restoring a dump file is sooo slow