Each Novell naming system has a schema, which contains the syntactic information about the naming system. It provides information about the relationships between contexts, information about the naming system’s attributes, the syntaxes of attributes, the composition of attribute values, and the relationships between classes in the naming system.
The detail specifications for the NDS schema are in the NDK: Novell eDirectory Schema Reference, which is part of the NDS Libraries for C Documentation. The following schema topics are briefly presented here:
The schema is structured as shown in the following graphic:
Figure 1-8 Schema Architecture

Although the schema is not a required part of a naming system, it makes the programmer’s job of figuring out how to use a naming system easier. Novell has implemented a schema for each of its naming system providers because it enhances the integration between naming systems. Each schema is implemented by the respective service provider to simulate a schema.
The schema objects are important to NetWare programmers because NDS has a rigorously defined schema, and in order to accomplish certain tasks in NDS, you must manipulate the schema. For example, the containment rules embedded within the schema root of the NDS provider tell you that it is meaningful to put an organizational unit in an organization
(OU=DOCUMENTATION.O=NOVELL)
and that you can put a user object in an organizational unit.
(CN=BILLY.OU=DOCUMENTATION)
But the rules also tell you that it is not meaningful to put an organization in an organizational unit, nor an organizational unit in a user.
The components stored in the schema consist of the schema root, which is the DirContext that contains all schema components for the entire naming system. Of all the Novell service providers, the schema of the NDS provider is the only one with a dynamic schema managed by the back-end data store. The following graphic shows JNDI attributes with the NDS schema.
Figure 1-9 JNDI Attributes with NDS Schema

Each context in a naming system has its own schema definition. You can find the definition using a DirContext’s getSchemaClassDefinition( ) method. The schema has a root, which contains attribute type definitions, object class definitions, and attribute syntax definitions. You can access the schema root using a DirContext’s getSchema( ) method.
The result of DirContext.getSchema( ) will be a DirContext with three subordinates, ObjectClassDefs, AttributeTypeDefs, and AttributeSyntaxDefs. Getting the schema class definition for the DirContext merely returns the schema for that object. Getting the schema returns the schema for the entire naming system.
An object class is a component of the schema that defines
An attribute type is a component of the schema that defines
Performing the getAttributes( ) method on a syntaxID returns a set of attributes that contains the syntax definitions of the attributes.
An attribute syntax is a component of the schema that defines the composition of an attribute value. In NDS, the syntax definition defines the class composition of an attribute value.