UML (Unified Modeling Language) provides a powerful way to model systems. One of its key features is generalization and specialization. These concepts allow us to organize and simplify complex relationships in a system. Let me explain the UML generalization and specialization work, using practical examples and a relevant business case.
What is UML?
Before diving into the details, let’s quickly cover UML. UML is a visual modeling language used in software development. It helps design and document complex systems by providing standardized diagrams. These diagrams improve communication and ensure everyone understands the system’s structure. Now, let’s focus on how UML handles generalizations and specializations.
Modeling UML Generalization and Specialization
Generalization groups the common properties of multiple classes into a single, generalized class. This makes models cleaner and easier to understand. For example, imagine we’re designing a system for managing clients. Both companies and individuals are clients. Instead of repeating shared attributes, we create a general “Client” class. This class connects to “Company” and “Person” classes with lines and arrowheads pointing to the generalized “Client” class.
Example:
- Abstract Generalization: The system must allow creating clients.
- Corresponding Specializations:
- The system must allow creating companies.
- The system must allow creating persons.
If “Client” is abstract (displayed in italics), it cannot have direct instances. This means users can only create “Company” or “Person” objects. However, if “Client” is not abstract, users can create generic client objects.

Generalization Sets and Constraints
UML introduces generalization sets to group subtypes logically. These sets often include constraints that define relationships between subtypes. Let’s break them down:
- Incomplete: Not all subtypes are listed. For instance, new roles like “Manufacturer” can be added later.
- Complete: All possible subtypes are covered. No new ones can exist.
- Disjoint: An instance belongs to only one subtype. For example, a contact is either a “Person” or a “Company.”
- Overlapping: An instance can belong to multiple subtypes. For example, a contact may be both a “Client” and a “Supplier.”
Example: Let’s expand the client example:
- Generalization Set: “Contact Type” – {Complete, Disjoint}: “Person” and “Company.”
- Generalization Set: “Contact Kind” – {Incomplete, Overlapping}: “Client,” “Supplier,” and “Interested Party.”
With these constraints, the system ensures accurate categorization. While every contact must be either a person or a company, they can simultaneously serve as clients, suppliers, or both.

Business Case: E-commerce CRM
Consider an e-commerce company implementing a CRM. They use UML to model their contact management system. All contacts share basic attributes like “Name” and “Email.” Subtypes such as “Person” and “Company” add specialized fields. For example, a “Company” contact might include “Tax ID,” while a “Person” contact has a “Date of Birth.”
- Constraint Application:
- “Contact Type” (Complete, Disjoint): A contact must be either a person or a company.
- “Contact Kind” (Incomplete, Overlapping): A contact can be a client, a supplier, or both.
This approach avoids duplication and ensures consistency. By grouping shared attributes into a generalized “Contact” class, the company simplifies its database design.
Heuristics for Identifying Generalizations
Identifying generalizations can be tricky. Here are two practical methods:
- Linguistic Formulations:
- Examples: “A dog is a kind of animal.” “A boss is a special type of employee.”
- Uniformity:
- When several classes share attributes or relationships, create a generalized class. Ensure the name reflects its broader purpose.
Final Thoughts
The concepts of UML generalization and specialization are invaluable for organizing complex systems. These concepts promote clarity and prevent redundancy. By applying constraints wisely, you can create models that are both flexible and precise. Whether you’re building a CRM or another application, UML ensures your design aligns with business goals.
This text is based on content from the source: International Requirements Engineering Board (ireb.org). The International Requirements Engineering Board is the owner of the copyright.