In its simple form (semantic form), it's a description that has a verb such as:
- consists of
Bad programmers worry about the code. Good programmers worry about data structures and their relationships.
The primary key of a relationship is the primary keys of the involved entities. See primary key relationship
To get the identifier on a global scope, you will add the namespace to the primary_key. See Logical Data Modeling - Global Identifier (Fully Qualified Name, Canonical Form).
role is a relationship attribute that defines the function performed in the relationship. It is used to distinguish two entity (object) of the entity set (class) when describing its use in the context of an association.
For instance, Husband and wife are roles
Visualisation / Representation / Implementation
A relationship can be represented or implemented in different ways. See Logical Data Modeling - Relationship Representation / Implementation / Visualisation
Arity / Degree
The degree of a relationship is the number of entities that participate in the relationship.
A relationship may be:
Relationship Property are only for binary relationship (ie between two elements)
|Property||Definition on a binary relationship|
|antisymmetric||if a is related to b, then b is not related to a or a = b|
|asymmetric||if a is related to b, then b is not related to a|
|symmetric||if a is related to b, then b is related to a|
|reflexive||if a can be related to a (to itself )|
|transitive||if a is related to b, b is related to c, then a is related to c|
A relationship is of true or false and can then be described by a comparison operator.
Relationship by data type
- For a relation (Relational Data Management)
- For text: Natural Language Processing:
- For code (In general)
- For graph
- For a tree