Home > Articles > Operating Systems, Server

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

LDAP Information Model

A directory service may be a bit fancier than the database you use to tally the overtime pay you've lost since taking your salaried administrator position a few years back, but the principles of operation are pretty much the same.

Object-Oriented Database

In X.500 terminology, the directory service database is called a Directory Information Base (DIB). If you think of an old-style library card catalog system as a kind of directory service, one of those big oak cabinets with rows of drawers would be a DIB.

The X.500 directory service structure was developed at a time when object-oriented databases represented leading-edge technology. If your only exposure to database technology has been more modern relational databases, the design constraints of an object database can look a little strange.

In an object-oriented database, each record (object) occupies a unique position in a hierarchical namespace. The object's name and path traces its origins to the top of the namespace, in much the same way that a Daughter of the American Revolution traces her forebears back to the Mayflower. A file system is an example of an object-oriented database.

Object databases consist of big, structured sequential files connected by a set of indexes that are themselves nothing more than big, structured sequential files. This underlying database technology is called Indexed Sequential Access Method, or ISAM. You'll see this term in the Event log and other reports.

The ESE database engine exposes the flat ISAM structure as a hierarchy of objects. In addition, Microsoft makes extensive use of COM technology by representing Active Directory objects as COM objects via the Active Directory Services Interface (ADSI).

Classes and Attributes

A directory service contains information about specific types of objects, such as User objects, Computer objects, and so forth. These are called object classes. A class is a bundle of attributes with a name. Figure 6.4 shows how attributes and classes are related.

06fig04.gifFigure 6.4. Classes and attributes in a directory service.

Attributes and Properties

Attributes are also often called properties. There is a difference between these two terms, but it is so subtle that most reference manuals, including this one, use them interchangeably.

The attributes associated with a particular object class differentiate it from other object classes. For example, User objects have different attributes than Computer objects or IP Security objects. Using a library card catalog as an example, different card formats represent different classes of items. A certain card format is used to record entries for Books. Another format is used for Tapes. The card format for Books would have spaces for Title, Author, ISBN, and so forth. A card for Tapes would have spaces for those entries plus additional spaces for Read-By and Play-Time.

An object class, then, is really nothing more than a bundle of attributes with a name. RFC 2256, “A Summary of the X.500(96) User Schema for use with LDAPv3,” defines 21 classes and 55 attributes for use in a standard LDAP directory service. Active Directory adds quite a few more for a total of about 200 object classes and 1500 attributes.

Classes also define the scope of a directory service database. You would not expect to find cards in a library card catalog representing Off-The-Road Vehicles or Double-Meat Hamburgers. Microsoft engineers defined the initial scope of Active Directory by including a certain set of object classes and attributes. This list can be extended by other applications or by administrators. For example, your organization could create attributes and classes for storing badge numbers and social security numbers in Active Directory.

Class Inheritance

Directory service designers strive to limit complexity by defining the minimum number of classes and attributes necessary to describe the objects of interest that need to be stored in the directory service database.

For example, in a library card catalog, it would be a mistake to create a class called Somewhat-Less-Than-Riveting-Early-20th-Century-American-Novels, even though it seems like quite a few objects would fit that class. In relation to the overall scope of a library, this classification would be too narrow. It would be better to have an attribute called Boring with a Boolean value. You could assign this attribute to the Book class so that objects derived from that class would get a Boring attribute that could be given a value of Yes or No or left empty. You could also assign the Boring attribute to the Periodical, Tape, and Video classes, as well.

A directory can have hundreds of classes and many hundreds of attributes. If the attributes for each class had to be separately defined, the sheer number of perturbations would make the directory look less like a tree and more like an example of German expressionism.

Fortunately, attributes associated with a particular class often overlap those of other classes. For example, the attribute list for the Mailbox class includes all the attributes associated with the Mail-Recipient class with one addition, the Delivery-Mechanism attribute. So, instead of separately defining all the attributes in Mailbox class, LDAP allows the class to be defined as a child of the Mail-Recipient class. This permits it to inherit the attributes of its parent. The designer need only stipulate the new additional attribute or attributes that make the subordinate class unique.

Attributes flow down the hierarchy of object classes like genes in a family tree. Figure 6.5 shows an example of class inheritance for the Computer object class.

06fig05.gifFigure 6.5. Inheritance diagram for the Computer object class.

All LDAP classes derive from a class called Top. This makes it possible to define certain attributes that every class would have in common. For example, every class needs a Common-Name attribute. The attribute is assigned to Top and the rest of the classes inherit it.

Think of Top as a director who never actually appears on camera but leaves a distinctive mark on the production. Top is an Abstract class, one of three class types in LDAP. They are as follows:

  • Abstract. Classes that exist solely to derive other object classes. There are 14 abstract classes in the Active Directory. Examples include Top, Device, Person, and Security Object.

  • Structural. Classes that have objects in Active Directory. Examples include User, Group, and Computer.

  • Auxiliary. Used to extend the definition of an Abstract class for specialized purposes. There are only six of these classes in Active Directory: Mail-Recipient, Dynamic-Object, MS-MMS Object, Sam-Domain, Sam-Domain-Base, and Security-Principal.

These three class types act like assembly line robots designed to produce things called “objects.” The Structural classes are the tools and dies that stamp and shape the objects. The Abstract classes are the mill workers and pattern makers that build the tools and dies. The Auxiliary classes act like a custom shop at the end of the line where special versions of standard objects are turned out.

Object Instances

Each object in Active Directory is derived from a specific object class. Another way of saying this is that an object represents an instance of a class. Each instance of an object class differs from another instance by having different values for its attributes.

Remember the movie Elephant Man? In a great scene, the lead character, John Merrick, stands in front of a curious mob and exclaims, “I am not an elephant. I am a human being.” Had Mr. Merrick been a directory services designer, he could have clarified his point by adding, “I am an instance of the Human Being class, not the Elephant class. And the only difference between you and me is a relatively minor attribute of mine that has a different value from yours. So lay off, will you?”

Defining suitable attributes for an object class can be slippery. Subtle differences may force a designer to create a new class. If you were designing a library card catalog, you might start out by defining a class called Tape with an attribute called Type that has two permitted values, Audio and Video. This decision forces you to define attributes for the Tape class that fully defines both audiotapes and videotapes. After months of agonizing, you might decide that the properties of audio and video tapes are so different that they warrant creating two classes, AudioTape and VideoTape, each with their own unique attribute sets. There are many instances in Active Directory and LDAP where two object classes differ by only one or two attributes.


A database schema defines the content and structure of the database. In a library card catalog, the schema would be a set of procedures and rules set down by the librarian. “Books go on green cards,” she tells you. “Videos go on red cards. File the cards alphabetically by Title in this cabinet and by Subject in that cabinet.” So on and so on. The schema for an LDAP directory service defines these items:

  • The attributes associated with each object class

  • The permissible object classes

  • The parent-child relationship of object classes, which in turn determines attribute inheritance

  • The data type associated with each attribute

  • The physical representation of the object in the user interface

The schema can take the form of an external table that acts as data dictionary or an internal table that is structured using the same rules as the database itself. Active Directory uses an internal schema. Many of the design constraints we'll see in the next chapter stem from the necessity to keep a consistent schema throughout all the servers that host a copy of the directory database.

Later in this chapter, we'll see how to modify the Active Directory schema to add new attributes and object classes that can be used by applications to support network operations.

LDAP Information Model Summary

Here are the important information model concepts to carry forward with you when you start designing an Active Directory system for your own organization:

  • LDAP uses an object-oriented database. The database engine for Active Directory is the Extensible Storage Engine, or ESE.

  • An object class defines a unique set of attributes for a particular type of object.

  • Object classes inherit attributes from their parents. This permits the designer to identify only the new attributes for a new object class.

  • Each object is an instance of an object class. The attributes for the object are assigned values that describe that particular object.

  • A schema defines the content and structure of the LDAP database. In the case of Active Directory, the schema is contained within the directory itself.

  • The directory schema must be consistent on every server hosting a copy of the database.

  • + Share This
  • 🔖 Save To Your Account