Browse Prior Art Database

Implement LDAP Search Queries with SQL

IP.com Disclosure Number: IPCOM000123463D
Original Publication Date: 1998-Dec-01
Included in the Prior Art Database: 2005-Apr-04
Document File: 6 page(s) / 165K

Publishing Venue

IBM

Related People

Bachmann, D: AUTHOR [+8]

Abstract

The LDAP API search calls accept a search filter in a simple string. The format of this string is defined in RFC 1960. The string representation of LDAP search filters allows users to access the powerful set of filters possible in the LDAP protocol. Users can put together filters to locate entries which satisfy very complicated criteria.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 34% of the total text.

Implement LDAP Search Queries with SQL

   The LDAP API search calls accept a search filter in a
simple string.  The format of this string is defined in RFC 1960.
The string representation of LDAP search filters allows users to
access the powerful set of filters possible in the LDAP protocol.
Users can put together filters to locate entries which satisfy very
complicated criteria.

   SQL, on the other hand, is the standard language to access
relational databases.  One of the main goal for LDAP/DB2 is to
provide a design and implementation such that all LDAP search
queries can be executed efficiently with SQL.  However, there can be
more than one way to translate LDAP filters to SQL.  Experimented
with three different methods and it was determined that the method
presented in this invention is the most efficient one.  The
performance results also showed that this system worked consistently
well compared with existing industry LDAP products.

   LDAP/DB2 provides a filter translator to generate the
equivalent SQL expression corresponding to an LDAP filter that can be
used in the WHERE clause of an SQL SELECT statement.  The following
describes the translation that is performed to generate the SQL
expressions.  The LDAP filter translator also generates the list of
SQL tables needed for the FROM clause.  The SQL SELECT statements
used by LDAP/DB2 search routines are in the following format:
  Base Level Search:
   SELECT entry.EntryData,
       creator,
       modifier,
       create_timestamp,
       modify_timestamp,
       Entry.EntryBlob,
       Entry.Entrysize
       from ldap_entry as entry
       where entry.EID in (
         select distinct ldap_entry.EID
         from <table list>
         where (ldap_entry.EID=<root dn id>)
         <sql where expressions>)
  One Level Search:
    SELECT entry.EntryData,
       creator,
       modifier,
       create_timestamp,
       modify_timestamp,
       Entry.EntryBlob,
       Entry.Entrysize
       from ldap_entry as entry
       where entry.EID in (
         select distinct ldap_entry.EID
         from ldap_entry, <table list>
           ldap_entry as pchild, <list of tables>
           where ldap_entry.EID=pchild.EID
           AND pchild.PIED=<root dn id>
           <sql where expressions>)
  Subtree Search
    SELECT entry.EntryData,
       creator,
       modifier,
       create_timestamp,
       modify_timestamp,
       Entry.EntryBlob,
       Entry.Entrysize
       from ldap_entry as entry
       where entry.EID in (
         select distinct ldap_entry.EID
         from ldap_entry, ldap_desc, <table list>
         where
         (LDAP_ENTRY.EID=ldap_desc.DEID AND
               ldap_desc.AEID=<r...