Schema

The schema defines the types of objects that can be created in your tree (such as Users, Printers, and Groups) and what information is required or optional at the time the object is created. Every object has a defined schema class for that type of object.

The schema that originally shipped with the product is called the base schema. Once the base schema has been modified in any way-such as adding a new class or a new attribute-then it is considered the extended schema.

You don't have to extend the schema, but you have the ability to do so. The Schema Manager tool in ConsoleOne lets you extend the schema to meet organizational needs. For example, you might want to extend your schema if your organization requires special footwear for employees and you need to keep track of employee shoe sizes. You might want to create a new attribute called Shoe Size and then add it to the User class.

For more information, see Managing the Schema.


Schema Manager

Schema Manager is a tool in ConsoleOne. It allows users who have Supervisor rights to a tree to customize the schema of that tree. Schema Manager is accessed from the Tools menu in ConsoleOne after you select a tree.

Use Schema Manager to:


Schema Classes, Attributes, and Syntaxes


Classes

A class is like a template for a directory object. A directory object is a class that has been filled in with data. In other words:

CLASS + DATA = DIRECTORY OBJECT

Each class has a class name, an inheritance class (unless it is at the top of the class hierarchy), class flags, and a group of attributes. Classes are named like directory objects (User, Printer, Queue, Server, and so on), yet they are just structure, no content.

An inheritance class is a class that is a starting point for defining other object classes. All of the attributes of the inheritance class are inherited by the classes that come below it in the class hierarchy.

A class hierarchy shows how a class is associated with its parent classes. This is a way of associating similar classes and allowing attributes to be inherited. It also defines the types of containers the class is valid in.

When creating a new class, you can use the class hierarchy and the additional attributes available to customize each class. You can specify an inheritance class (which allows the new class to inherit all of the attributes and flags of a class higher in the hierarchy) and then customize the new class by selecting one or more attributes to add to those that were inherited. The additional attributes can be selected as mandatory, naming, or optional attributes.

You can also modify existing classes by adding optional attributes.


Attributes

Attributes are the data fields in the NDS database. For example, if a class is like a form, then an attribute is one field on the form. When an attribute is created, it is named (such as surname or employee number) and given a syntax type (such as string or number). From then on, it is available in the attribute lists in Schema Manager.


Syntaxes

There are several syntax options from which to choose. These are used to specify the type of data entered for each attribute. The syntax can only be specified when an attribute is created. You cannot modify it later. Available syntaxes include:


Understanding Mandatory and Optional Attributes

Every object has a schema class that has been defined for that type of object, and a class is a group of attributes organized in a meaningful way. Some of these attributes are mandatory and some are optional.


Mandatory Attributes

A mandatory attribute is one that must be filled in when an object is being created. For example, if a new user is being created using the User class, which has the employee number as a mandatory attribute, then the new User object cannot be created without providing the employee number.


Optional Attributes

An optional attribute is one that can be filled in if desired but can be left without content. For instance, if a new User object is being created using the User class, which has Other Names as an optional attribute, then the new User object can be created with or without data provided for that attribute, depending on whether the new user is known by other names.

An exception to the rule is when an optional attribute is used for naming, the attribute then becomes mandatory.


Sample Schema

Figure 14 is a sample of part of a schema. Your base schema might appear similar.

This icon is assigned to all classes that are extensions to the base schema.

Figure 14


Design the Schema

Designing your schema initially can save you time and effort in the long run. You can view the base schema and determine if it will meet your needs or if modifications are required. If changes are needed, use Schema Manager to extend the schema. See Extending the Schema for more information.