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

Re: schema newbie question


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:


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

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' (, otherwise you may be satisfied with the ASCII-only 'IA5String' (

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. :-)