Classes and Instances of Entities and Relationships

Ontiki's worldview and terminology are quite eclectic, borrowing from:

In any case, the basic ideas are as follows:

  • A page may describe a class or instance of an entity or relationship.

  • Entities play specific roles in relationships.

    In "A writer may write about a topic", "a writer" and "a topic" are classes of entities that may play particular roles in the "write about" relationship.

    In "Rich Morin writes about Ontiki", "Rich Morin" and "Ontiki" are instances of these entities, plugged into the appropriate roles in an instance of the relationship.

  • Classes define the nature of characteristics that instances may have.

    The class "writes about", for example, is defined as having two roles: "a writer" and "a topic".

  • Instances define the specific details of these characteristics.

    An instance of "writes about" would define the entities (i.e., "Rich Morin" and "Ontiki") that fill these roles.

  • Each class or instance has a name.

    Classes have descriptive names, as do instances of entities. Instances of relationships have mechanically-generated IDs.

With this background in mind, let's look at two diagrams. The first diagram shows the general connectivity between classes and instances of entities and relationships:

The second diagram simply substitutes in specific names:

Because Ontiki knows about the characteristics of classes, it can ensure that instances comply with them. For example, because "Ontiki" is not "a writer", it would not be allowed to play that role in an instance of "writes about".

Fine Points

The preceding discussion finessed a few fine points in the interest of simplicity. Let's fill them in:

  • An instance may only have one class.

  • A class may have zero or more instances.

  • A class may have one or more super-classes (parents).

  • A class may have zero or more of super-classes (children).

  • An entity may play zero or more roles.

  • A relationship may have one or more roles (few exceed four).