Loading learning content...
An ER diagram is, at its core, a visual communication tool. It must convey complex database structures to diverse stakeholders—from business analysts who validate requirements, to database administrators who implement the schema, to developers who write queries. The notation we use directly impacts comprehension, accuracy, and collaboration.
Aggregation introduces a unique visual challenge: how do we show that a relationship participates in another relationship? Unlike entities and simple relationships, which have well-established, universally recognized symbols (rectangles for entities, diamonds for relationships), aggregation requires a notation that visually encapsulates a relationship and its participants while allowing that encapsulated unit to connect to other elements.
In this page, we'll master the notation for aggregation—examining standard conventions, variations across methodologies, and best practices for creating clear, professional ER diagrams that accurately represent aggregation constructs.
By the end of this page, you will understand the standard notation for aggregation in ER diagrams, be able to read and interpret aggregation constructs in existing diagrams, create your own aggregation diagrams following best practices, and understand notation variations across different methodologies.
The standard notation for aggregation uses a bounding rectangle (or box) drawn around the relationship and its participating entities. This box visually encapsulates the aggregated unit, treating it as a single higher-level element.
Core Notation Elements:
Inner Elements: The entities and relationship being aggregated are drawn as normal (rectangles for entities, diamond for relationship, lines connecting them)
Bounding Box: A rectangle is drawn around the entire inner structure—encompassing both entities and the relationship diamond
Box Styling: The bounding box is typically drawn with:
Aggregation Label: The aggregated unit may optionally receive a label (placed near or on the bounding box) indicating its conceptual name
Outer Connection: A line extends from the bounding box to the outer relationship diamond, which then connects to the outer entity
Different textbooks and tools use slightly different conventions. Elmasri & Navathe use a solid rectangle. Some tools use dashed rectangles. Others use a double-line rectangle. The key semantic meaning—that the enclosed elements are treated as a unit—remains consistent across variations.
Visual Structure (Text Description):
┌─────────────────────────────────────────────────┐
│ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ EMPLOYEE │───────│ PROJECT │ │
│ └──────────────┘ ◇ └──────────────┘ │
│ WORKS_ON │
│ │ │
│ (attributes) │
│ │
└───────────────────────┬─────────────────────────┘
│ (aggregation connection)
│
◇ SPONSORS
│
│
┌───────────────┐
│ MANAGER │
└───────────────┘
Reading the diagram:
Creating an aggregation diagram requires a methodical approach. Here's a detailed step-by-step process:
Step 1: Draw the Inner Relationship First
Begin by drawing the inner relationship as if no aggregation exists:
Example: Draw EMPLOYEE rectangle, PROJECT rectangle, WORKS_ON diamond, connecting lines with M:N cardinality, and attributes like start_date, hours_per_week.
Step 2: Verify Inner Relationship Completeness
Before adding the aggregation box, verify:
Step 3: Draw the Bounding Box
Now add the aggregation rectangle:
Step 4: Add Aggregation Label (Optional)
If the aggregated concept has a meaningful name in the domain, add it:
Step 5: Draw the Outer Entity
Position and draw the outer entity that will relate to the aggregation:
Step 6: Draw the Outer Relationship
Connect the aggregation to the outer entity:
Step 7: Add Outer Relationship Attributes
If the outer relationship has attributes:
Step 8: Add Participation Constraints
Indicate participation constraints for the outer relationship:
Position the aggregation box and outer entity so the outer relationship diamond is clearly visible and the connecting lines don't cross other elements. A common layout places the aggregation box centrally with the outer entity to the right or below.
Correctly notating cardinality and participation constraints is crucial for aggregation diagrams. These constraints apply at multiple levels and must be clearly distinguished.
Inner Relationship Cardinality:
The inner relationship uses standard cardinality notation:
| Style | 1:1 | 1:N | M:N |
|---|---|---|---|
| Chen (labels) | 1 — 1 | 1 — N | M — N |
| Min-Max | (1,1) — (1,1) | (1,1) — (1,N) | (0,N) — (0,N) |
| Crow's Foot | ──||── | ──||──<< | ──<<──<< |
Place the cardinality notation on the lines connecting entities to the inner relationship diamond.
Outer Relationship Cardinality:
The outer relationship also requires cardinality notation. This cardinality describes:
The notation is placed on:
Example cardinality reading:
Aggregation Box ──N── ◇ SPONSORS ──M── MANAGER
This indicates M:N cardinality: a manager can sponsor many work assignments, and a work assignment can have many manager sponsors.
A frequent mistake is placing outer relationship cardinality on lines to individual inner entities rather than to the aggregation box. The cardinality should be on the line connecting the aggregation box (as a unit) to the outer relationship, not on lines to EMPLOYEE or PROJECT individually.
Participation Constraints:
Participation is typically shown using line styles:
| Participation | Notation | Meaning |
|---|---|---|
| Total (mandatory) | Double line (══) | Every instance must participate |
| Partial (optional) | Single line (──) | Instances may or may not participate |
Applying participation to aggregation:
Total participation of aggregation in outer relationship:
Partial participation of aggregation in outer relationship:
Total participation of outer entity:
Partial participation of outer entity:
Combined notation example:
┌───────────────────────────┐
│ EMPLOYEE ── WORKS_ON ── PROJECT │ ══════ ◇ SPONSORS ────── MANAGER
└───────────────────────────┘
(Double line from aggregation = Total participation: every assignment needs a sponsor)
(Single line to MANAGER = Partial participation: not all managers have sponsorships)
| Constraint | Where Applied | Notation |
|---|---|---|
| Inner relationship cardinality | Lines between inner entities and inner relationship diamond | 1, N, M labels or min-max or crow's foot |
| Outer relationship cardinality | Lines from aggregation box and outer entity to outer relationship diamond | Same notation style as inner |
| Inner entity participation | Lines from inner entities to inner relationship | Single (partial) or double (total) lines |
| Aggregation participation | Line from aggregation box to outer relationship | Single (partial) or double (total) lines |
| Outer entity participation | Line from outer entity to outer relationship | Single (partial) or double (total) lines |
Different ER modeling methodologies and tools represent aggregation with varying notation styles. Understanding these variations helps you work across different contexts and with different teams.
Chen Notation (Original ER):
The classic Chen notation (and its extensions) uses:
The aggregation rectangle is typically a solid line, same weight as entity rectangles. Some variations use a dashed or dotted rectangle to distinguish the aggregation box from entity rectangles.
Enhanced ER (EER) Notation:
Textbooks like Elmasri & Navathe use a solid rectangle around the aggregated elements. The rectangle may be labeled (e.g., with the aggregation name in italics above the box) or left unlabeled when the aggregation intent is clear from context.
IDEF1X Notation:
IDEF1X (Integration Definition for Information Modeling) uses different visual conventions. Aggregation-like concepts may be represented through relationship cardinality and entity types rather than explicit bounding boxes. IDEF1X focuses more on the relational mapping and less on conceptual abstraction.
Crow's Foot (IE) Notation:
Crow's Foot notation (used in tools like ER/Studio, MySQL Workbench) doesn't have a standard aggregation symbol. Workarounds include:
UML Class Diagrams (Association Classes):
UML represents a similar concept through association classes. An association class is a relationship (association) that has class-like properties and can participate in other associations.
Notation:
While not identical to ER aggregation, association classes serve a similar purpose: treating associations as first-class elements.
Object-Role Modeling (ORM):
ORM uses the concept of objectification (also called nesting). A relationship is objectified by drawing a rounded rectangle around the relationship's fact type. The objectified fact can then participate in other fact types.
Barker Notation:
Barker notation (used in Oracle Designer and other tools) represents relationships differently and doesn't have explicit aggregation notation. Similar effects may be achieved through careful entity and relationship design.
| Methodology | Aggregation Representation | Key Visual Element |
|---|---|---|
| Chen / EER | Bounding rectangle around relationship and entities | Solid or dashed rectangle |
| IDEF1X | No explicit notation; model through relationship structure | Dependent entity types |
| Crow's Foot (IE) | No standard; use intersection entity or annotations | Junction/bridge entity |
| UML | Association class | Dashed line to class box from association |
| ORM | Objectification / nesting | Rounded rectangle around fact type |
| Barker | No explicit notation | Design through entity structure |
Before creating aggregation diagrams, check your diagramming tool's capabilities. Some tools (like Lucidchart, draw.io, or professional database design tools) support aggregation notation directly. Others may require manual drawing of the bounding box using shape tools. Choose a tool that supports your notation needs or establish team conventions for manual representation.
Being able to quickly and accurately read aggregation diagrams is as important as creating them. Here's a systematic approach to interpreting aggregation notation:
Step 1: Identify the Aggregation Box
Look for a bounding rectangle that encloses multiple elements. This box indicates aggregation. Note:
Step 2: Understand the Inner Relationship
Analyze the structure inside the box:
Example reading: "EMPLOYEE works on PROJECT with M:N cardinality. The relationship has attributes start_date and hours_per_week."
Step 3: Identify the Outer Entity
Look outside the aggregation box:
Step 4: Understand the Outer Relationship
Analyze how the aggregation connects to the outer entity:
Example reading: "MANAGER sponsors the aggregated work assignment with M:N cardinality. Sponsorship has attributes allocated_budget and priority."
Step 5: Formulate the Complete Semantics
Combine your understanding into a complete semantic statement:
Example: "MANAGER sponsors (EMPLOYEE works_on PROJECT). A manager can sponsor multiple work assignments, and each work assignment can have multiple sponsors. Sponsorship includes budget allocation and priority."
Practice Exercise:
Given a diagram description:
┌──────────────────────────────────────────┐
│ STUDENT ── ENROLLS_IN ── COURSE (M:N) │ ── FUNDED_BY ── SCHOLARSHIP (M:N)
└──────────────────────────────────────────┘
ENROLLS_IN attributes: semester, grade
FUNDED_BY attributes: amount, award_date
Reading:
When reading diagrams from unfamiliar sources, pay attention to the notation style being used. Check if the document includes a legend or notation guide. If the bounding box is dashed rather than solid, or if there's an aggregation label, use these cues to confirm your interpretation.
Real-world data models sometimes require more complex aggregation structures. Understanding notation for these scenarios prepares you for advanced modeling challenges.
Scenario 1: Multiple Outer Entities
The same aggregated relationship may participate in relationships with multiple outer entities:
┌──────────────┐
AUDITS │ AUDITOR │
┌─────────┴──────────────┘
┌─────────────────────────────┤
│ EMPLOYEE ── WORKS_ON ── PROJECT │
└─────────────────────────────┤
└─────────┬──────────────┐
SPONSORS │ MANAGER │
└──────────────┘
Both AUDITOR and MANAGER relate to the same aggregated work assignment, through different outer relationships (AUDITS and SPONSORS). Each outer relationship has its own attributes and cardinality.
Scenario 2: Aggregation Within Aggregation (Nested Aggregation)
In rare complex scenarios, an aggregated relationship may itself be aggregated:
┌─────────────────────────────────────────────────────────────────┐
│ ┌──────────────────────────────────┐ │
│ │ EMPLOYEE ── WORKS_ON ── PROJECT │ ── SPONSORS ── MANAGER │
│ └──────────────────────────────────┘ │
└───────────────────────────────────────┬─────────────────────────┘
│
APPROVED_BY
│
┌───────────────┐
│ DIRECTOR │
└───────────────┘
In this (admittedly complex) scenario:
This creates three levels. While structurally possible, such deep nesting is rarely needed and should be used with caution.
Scenario 3: Aggregation of Ternary Relationships
A ternary (or higher-degree) relationship can also be aggregated:
┌──────────────────────────────────────────────────────┐
│ │
│ SUPPLIER ──┐ │
│ │ │
│ ◇── SUPPLIES ────── PROJECT │
│ │ │
│ PART ──┘ │
│ │
└───────────────────────────────┬──────────────────────┘
│
CONTRACTED_THROUGH
│
┌───────────────┐
│ CONTRACT │
└───────────────┘
The ternary relationship SUPPLIES (among SUPPLIER, PART, and PROJECT) is aggregated, and CONTRACT relates to specific supply arrangements.
While nested aggregation and aggregation of ternary relationships are possible, they significantly increase model complexity. Before using these advanced structures, verify that simpler alternatives don't suffice. Often, restructuring the model or splitting into multiple simpler relationships provides clarity without sacrificing expressiveness.
Scenario 4: Multiple Aggregations in Same Diagram
Large data models may contain multiple, independent aggregation constructs:
┌─────────────────────────────┐ ┌─────────────────────────────┐
│ EMPLOYEE ── WORKS_ON ── PROJECT │──SPONSORS──MANAGER │ STUDENT ── ENROLLS_IN ── COURSE │──FUNDED_BY──SCHOLARSHIP
└─────────────────────────────┘ └─────────────────────────────┘
Each aggregation is independent and should be visually separated in the diagram layout. Use consistent notation across all aggregations for clarity.
Notation Guidelines for Complex Scenarios:
Creating professional, clear, and maintainable aggregation diagrams requires attention to detail and adherence to best practices.
Practice 1: Consistent Notation Throughout
Select a notation style and apply it consistently:
Practice 2: Adequate Spacing and Margins
Visual clarity depends on proper spacing:
Practice 3: Meaningful Labels
Labels communicate semantics:
Practice 4: Visual Hierarchy
The diagram layout should guide the reader's eye:
Practice 5: Attribute Management
Attributes can clutter diagrams if not managed:
Practice 6: Documentation and Legends
Complex diagrams benefit from supporting documentation:
Practice 7: Review and Validation
Always validate your diagrams:
For professional ER diagrams including aggregation, consider tools like Lucidchart, draw.io, Microsoft Visio, or database-specific tools like Oracle SQL Developer Data Modeler. For academic work, even presentation software like PowerPoint or Google Slides can create clean diagrams with shape tools. The key is mastering the notation, not the tool.
We've comprehensively covered the notation for representing aggregation in ER diagrams. Let's consolidate the key takeaways:
What's next:
Now that we can read and create aggregation diagrams, the next page explores use cases—the specific real-world scenarios where aggregation is the appropriate modeling choice. We'll examine domain-specific examples across multiple industries.
You now understand the notation for aggregation in ER diagrams—standard symbols, diagramming process, cardinality and participation notation, methodology variations, and best practices. You can read existing aggregation diagrams and create your own professional diagrams. Next, we'll explore concrete use cases where aggregation solves real modeling problems.