Pattern oneToOne

SVG plug-in required to display this diagram


Description This pattern implements the classic One-to-one relationship.
Default Namespace http://www.aoModeling.org/patterns/generic/relationship/oneToOne
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 {none}
Purpose The purpose of this pattern is to establish a relationship between two entities.
Motivation One-to-one relationships occur quite often in real world scenarios, for example the relationship between husband and wife in western societies.
Applicability This design pattern should be applied for binary one-to-one relationships. It should not be applied to one-to-many 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 Husband-Wife relationship, Car-Carholder relationship.
Related Patterns
composite http://www.aoModeling.org/patterns/generic/aggregation/composite
Use the composite pattern when dealing with aggregations.
asymmetricOneToOne http://www.aoModeling.org/patterns/generic/relationship/asymmetricOneToOne
The asymmetricOneToOne pattern should be used when the application of the oneToOne pattern would cause orphaned assets, for example, when the participating entities of the relation are located in different containers (L2S).
oneToMany http://www.aoModeling.org/patterns/generic/relationship/oneToMany
The oneToMany relationship should be used when one entity relates to more than one other entities of the same type.
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