Class definition

< Class

Introduction

 * A class diagram is always made for a specific domain, namely the organization for which we create the domain model.
 * What a concept represents, and what is relevant or irrelevant is different and specific for each organisation.
 * Establishing class definitions allow us to create a vocabulary for the organisation so that everybody knows what is meant with a certain kind of concept and has the same idea of when an object is member or not of a particular class.
 * This kind of vocabulary is called an ontology.

Ontology

 * In information science an ontology formally represents knowledge as a set of concepts within a domain.
 * It means that for that domain you create a shared vocabulary that you use to denote the types, the properties and interrelationships of the concepts.
 * The conceptual domain model defines a shared vocabulary for your organization.
 * It is important that an organization has a shared understanding of all its core concepts.

Example
Some instances in a supermarket for the PRODUCT class are: skimmed milk, pink lady apple, kitchen towel. Now, each of those instances actually represents a number of items that are on the shelf in your supermarket. For example, skimmed milk represents the different bottles that you find on the shelf. There are many bottles linked to the instance skimmed milk. This product will have something like a stock level and when the stock is too low you can replenish this product.

At a car retailer products are unique. Some examples of instances are: Citroën C1 with a chassis number 12345, the second instance is another Citroën C1 but with another chassis number: 78976 and so on. These products do not have something like a stock level and you cannot replenish this product. Rather, each product represents now a specific unique item with a unique serial number. It's a totally different concept of a product because now you cannot replenish this product and it doesn't have a stock level, like in the supermarket.

So you see how the notion of product is different from organization to organization and that's the reason why each class within a class diagram needs a good definition so that all people in the organization have a shared understanding of the meaning of each individual class or concept.