A method and apparatus for applying an application of a data service, such
as X.500 and LDAP, to a relational database, a database design and use of
the database to perform such directory services. Specifically addressed
is the problem of achieving efficient searching of a directory service
database coupled with effective input or output of data from the
database. The disclosed method and apparatus, which provide end
efficiency and data tolerance in the provision of a variety of database
services, is based upon the concurrent storage in a database of both a
normalised (syntax normalised) form and a raw (protocol encoded) form of
the data. The raw form of data may be in ASN.1. A further feature of the
disclosed method and apparatus concerns the transfer of data in and out
of a database, where, in finding data in the database, a normalised form
is used, and, in transferring data out of the database, a raw form is
used. Syntax rules are used to convert the raw form of data to or from
the normalised form in which it is stored.