Pattern oneToMany

SVG plug-in required to display this diagram


Description This pattern implements the classic One-to-many relationship.
Default Namespace http://www.aoModeling.org/patterns/generic/relationship/oneToMany
Namespace Prefixes {none}
Scope Definitions {none}
Default Type System {none}
Type System Prefixes {none}
Default Constraint Language {none}
Constraint Language Prefixes {none}
Default Operation Vocabulary {none}
Operation Vocabulary Prefixes {none}
Design Patterns {none}
Included Models {none}

Pattern Info

Category generic/relationship
Keywords relationship
Alias names manyToOne
Purpose The purpose of this pattern is to establish a relationship between a single entity of type A to multiple entities of type B.
Motivation One-to-many relationships occur quite often in real world scenarios, for example the relationship between manager and staff, or between a tutorial and the students attending the tutorial.
Applicability This design pattern should be applied for binary one-to-many relationships. It should not be applied to one-to-one relationships or many-to-many relationships. It is also not suitable for ternary, or even higher n-ary relationships, or for composite/part situations.
Consequences

This design pattern establishs a relationship between two entities by explicitely construction an asset incorporating this relationship.

Advantages: The symmetric layout of this pattern makes the relationship easy to identify

Disadvantages: If both entities are located in different containers (L2S), it is not quite clear in which container to install the relationship asset. Also, the relationship asset may become an orphan.

Known Applications Supplier-Customer relationship, Professor-Student relationship.
Related Patterns
composite http://www.aoModeling.org/patterns/generic/aggregation/composite
Use the composite pattern when dealing with aggregations.
asymmetricOneToMany
Use the asymmetricOneToMany pattern when orphan assets would result from the application of the oneToMany pattern.
oneToOne http://www.aoModeling.org/patterns/generic/relationship/oneToMany
The oneToOne relationship should be used when the relationship relates one entity to exacly one other entity.
Level 2 Structures Relationship
Assets {none}
Annotations {none}
Errors {none}
Warnings {none}
Infos {none}
Status Pattern contains 0 errors, 0 warnings, and 0 infos

Graphics Index