Easily Memorize the 6 UML Class Diagram Relationships

UMLClass DiagramSoftware Engineering클래스 다이어그램소프트웨어 공학
Read in about 1 min read
Published: 2025-07-05
Last modified: 2025-07-05
View count: 41

Summary

Learn how to easily memorize the six types of UML class diagram relationships (Association, Dependency, Generalization, Realization, Composition, Aggregation) with a summary table.

The six relationships in UML class diagrams are crucial for understanding software design, but their similar terms can be confusing at first. Grouping similar concepts together and summarizing them in a table helps you grasp and memorize them at a glance.

UML Class Diagram Relationships Summary Table

There are 6 relationships in total, consisting of 2 strong/weak has-a relationships (Composition/Aggregation), 2 strong/weak uses-a relationships (Association/Dependency), 1 is-a relationship, and 1 can-do relationship (Generalization/Realization).

RelationshipCore ConceptKeywordsSimple Example
CompositionStrong has-aShared Lifecycle, Essential Part (Composition)House and Room (If the house disappears, the room also disappears.) House [filled diamond] -> Room
AggregationWeak has-aIndependent Lifecycle, Optional PartDepartment and Student (Even if the department disappears, the student doesn't disappear.) Department(whole) [empty diamond] -> Student(part)
AssociationStrong uses-aMember Variable, Lasting RelationshipSoccer Team and Striker (The soccer team always uses the striker.) Soccer Team -> Striker
DependencyWeak uses-aMethod Parameter, Brief UseDeveloper and Book (The developer uses the book briefly.) Developer --> Book
Generalizationis-a (Inheritance)Inheritance, Parent-ChildCat is an Animal. (Animal is more general than cat. Divided into superclass(animal) and subclass(cat), Animal <- Cat)
Realizationcan-do (Implementation)Interface, Fulfilling a contractRobot can clean. (Grouped by 'capability' to clean. 'Can clean' <-- 'Person')

Class Diagrams for Each Relationship (Mermaid)