Classification and Generalization

I often hear people talk about subtyping as the "is a" relationship. I urge you to beware of that way of thinking. The problem is that the phrase "is a" can mean different things.

Consider the following phrases.

  1. Shep is a Border Collie.

  2. A Border Collie is a Dog.

  3. Dogs are Animals.

  4. A Border Collie is a Breed.

  5. Dog is a Species.

Now try combining the phrases. If I combine phrases 1 and 2, I get "Shep is a Dog"; 2 and 3 taken together yield "Border Collies are Animals." And 1 plus 2 plus 3 gives me "Shep is an Animal." So far, so good. Now try 1 and 4: "Shep is a Breed." The combination of 2 and 5 is "A Border Collie is a Species." These are not so good.

Why can I combine some of these phrases and not others? The reason ...

Get UML Distilled: A Brief Guide to the Standard Object Modeling Language, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.