3.1 Mapping of eDirectory Data to Relational Tables

The object class and attribute definitions in the eDirectory schema are taken from their structure as a hierarchical X.500 directory and mapped to a flattened relational database table. eDirectory concepts such as object class inheritance, naming attributes, and attribute syntax give way to the relational database features of tables and columns. Actual entries, or objects created in the eDirectory database, become the rows in the table. The eDirectory data in a relational table has the following format:

For example, a table for the User object with four entries and with three attributes (Surname, Given Name, and Title) would look similar to the following diagram.

Figure 3-1 Mapping of eDirectory Data to Relational Tables.

The eDirectory class name corresponds with the table name, for example, the table for the Volume object is Volume. However, the eDirectory classes "User" and "Group" are exceptions to this convention. They are represented as "UserNDS" and "GroupNDS" because these class names are also SQL keywords. The following table describes in general the eDirectory elements and their SQL counterparts.

Table 3-1 eDirectory elements and their SQL counterparts.

SQL

eDirectory

Database

The selected tree and context represents the database. These are selected when the Data Source is configured.

Refer to Section 2.5, Selecting the eDirectory Data Source for more information.

Tables

eDirectory classes are represented as database tables. The table name is the same as the class name. If the class name contains spaces, the table name must be enclosed in double quotes in an SQL query.

Two of the eDirectory class names have been given special table names to avoid conflicts with the SQL query keywords. The table for the User class is UserNDS, and the table for Group class is GroupNDS.

eDirectory has more than one type of class: effective and non-effective classes; super and auxiliary classes. Class type affects the entries that belong to the table. (For more information, see Section 3.7, eDirectory Class Types.)

Columns

eDirectory class attributes represent the table columns. Each attribute represents one or more table columns. If the attribute type is a structure, it will result in more than one column in the database table. For example, the "Home directory" attribute will create the following three possible columns in the table:

  • Home Directory_NameSpace
  • Home Directory_Path
  • Home Directory_VolName

For more information, see Section 3.5, Data Type Mappings.

Records

Each eDirectory object represents one or more rows in the database table. If an object has a multi-valued attribute and multiple values have been assigned to the attribute, the object can have multiple rows in the table.

For more information, see Section 3.4, Multi-Valued Attributes.

Special Columns

Special columns are used to present additional information items which are available from the eDirectory database but are not attributes. These items include the object’s eDirectory context, tree name, and full name. For more information, see Section 3.2, Special Columns in Tables.