[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: schema newbie question



David:

Thanks a lot.

David Smith wrote:

srgqwerty wrote:

What is the best 'SYNTAX' for an attributetype for store a positive integer value between 1 and 65535?
What is the best 'SYNTAX' for an attributetype for store a string?



Take your pick from Table 8.3 found here:

   http://www.openldap.org/doc/admin21/schema.html

For your integer attribute, I would recommend (drumroll...) an 'Integer' (1.3.6.1.4.1.1466.115.121.1.27).

The choice for your string is a little more difficult. Do you plan to use more than the ASCII character set? Will your strings be less than 32,768 characters in length? If so, use 'directoryString' (1.3.6.1.4.1.1466.115.121.1.15), otherwise you may be satisfied with the ASCII-only 'IA5String' (1.3.6.1.4.1.1466.115.121.1.26).

The best way to determine which syntax to use is to look at the schema files provided with OpenLDAP and copy-cat those attributes whose purpose resembles your own.

LDAP schema specification is generally not quite as particular as it is for most relational DBMSs (judging from your question, it seems that is your background). For example, in MySQL, you would be very careful to distinguish between a 'varchar(10)' and a 'text' field. OpenLDAP is quite differnet. In fact, I don't really know why I bothered comparing the two: it's like apples to oranges. Oh well. Take it for what it's worth. :-)

--Dave