
Relationships between two entity types are defined by specifying the two entity types involved, that is, the source entity type (the existentially independent entity type) and the target entity type (the existentially dependent entity type). The relationship is oriented; from the independent entity type to the dependent entity type. Relationships have these characteristics:
Type
Cardinality
Their business significance
The relationship Offers exists between the entity types Faculty (source entity type) and Courses (target entity type).
Type
A relationship category can be hierarchical, aggregating, referential, or external.
Hierarchical:
There is a hierarchical relationship category between two entity types when the following apply:
The target entity type is existentially dependent on the source entity type, that is, the life span of a characteristic of the target entity type is shorter than or equal to the life span of the characteristic of the source entity type.
The target entity type is generated from the source entity type, that is, the source entity type influences the characteristic values directly.
The target entity type represents a semantic refinement, that is, the target entity type is a classification of the source entity type which describes the source entity type more precisely.
The key of the source entity type becomes part of the key of the target entity type. You may not change the relationship between two entities.
The relationship Offers with the cardinality 1:CN exists between the entity types Faculty (source entity type) and Courses (target entity type).
The source entity type Faculty has the attributes Faculty Number (key attribute) and Faculty Name.
The target entity type Courses has the attributes Faculty Number (key attribute), Course Number (key attribute), Number of the Course Instructor, and Course Name.
Since, with this category of relationship, the source entity identifies the associated target entity by means of a part of the key attributes, a change to a relationship would mean that the target entity would be deleted and a new target entity would be created.
Aggregating:
There is an aggregating relationship category between two entity types when the following apply:
The target entity type is existentially dependent on the source entity type, that is, the life span of a characteristic of the target entity type is shorter than or equal to the life span of the characteristic of the source entity type.
The target entity type is generated from the source entity type, that is, the source entity type influences the characteristic values directly.
At least one other source entity type, different from the first one, is involved in the formation of the target entity type.
The keys of the source entity types become part of the canonic key of the target entity type.
The aggregating and the hierarchical relationship categories differ from one another only in the third characteristic.
Referential:
There is a referential relationship category when the following apply:
The target entity type is existentially dependent on the source entity type.
The source entity type determines the context of the target entity type, that is, an attribute group of the start entity type is present in the target entity type, but this does not generate the target entity type.
The key attributes of the source entity type are included in the target entity type as non-key-attributes. You may not change the relationship between two entities.
The relationship Teaches with cardinality 1:CN exists between the entity types Professor (source entity type) and Courses (target entity type).
The source entity type Professor has the attributes Number (key attribute), Name, Address, and Salary Class.
The target entity type Courses has the attributes Faculty Number (key attribute), Course Number (key attribute), Number of the Course Instructor, and Course Name.
A distinction is made between strong and weak existential dependence. Strong existential dependence requires there to be an assignment to exactly one characteristic of the source entity type for each characteristic of the target entity type. If this condition applies only to one (time-dependent) subset of the target entity type, the existential dependence is said to be weak.
Weak existential dependence can occur in aggregating and referential relationship categories but not in hierarchical relationship categories.
This results in the following situation:
Classification of relationship categories
|
strong existential dependence |
weak existential dependence |
|
|---|---|---|
|
generating |
hierarchical aggregating |
conditional-aggregating |
|
context |
referential |
conditional-referential temporary-referential |
External:
A relationship between an entity type within a data model and an entity type outside the data model is described as an 'external' relationship.
Cardinality
The cardinality (n : m) describes the relationship with respect to the number of dependent entities (entities of the target entity type) and independent entities (entities of the source entity type) in the relationship.
The possible values for the left and right sides of the cardinality have the following significance:
n = 1
For each dependent entity, there is precisely one independent entity.
n = C
Dependent entities can exist that do not refer to an entity of the source entity type.
m = 1
For each entity of the source entity type, there is exactly one dependent entity.
m = C
For each entity of the source entity type, there is a maximum of one dependent entity.
m = N
For each entity of the source entity type, there is at least one dependent entity.
m = CN
For each entity of the source entity type, there can be any number of dependent entities.
Note that the Structured Entity Relationship Model (SERM) does not allow m:n relationships (that is, many-to-many relationships). Therefore, entity types in SERM can be arranged from left to right, from independent to dependent entity type.
The cardinality C:x (x = 1, C, CN, N) should be used only for relationships of the category 'referential'. However, this cardinality is also possible for relationships of the category 'aggregating'.
Hierarchical relationships do not allow this cardinality, since all dependent entities must refer to an entity of the source entity type.