Module 05b - Relationships and Patterns in ER Model Flashcards
Solid line vs dashed line
The solid line connecting an ID-dependent entity and its parent is called an identifying relationship. The dashed line connecting strong entities or a non-ID-dependent weak entity to its parent is called a nonidentifying relationship.
Strong Entity vs Weak Entity
Most of the basic entity types are classified as strong entity types (Rectangle) – one that exists independently from other entity types (such as EMPLOYEE) Always have a unique characteristic (identifier) – an attribute or combination of attributes that uniquely distinguish each occurrence of that identity A weak entity type – existence depends on some other entity type. It has no meaning in the ER diagram without the entity on which it depends (such as DEPENDENT) The entity type on which the weak entity type depends is called the parent.
Weak Entities
A weak entity is an entity whose existence depends upon another entity. All ID-Dependent entities are considered weak.
There are also non-ID-dependent weak entities. The identifier of the parent does not appear in the identifier of the weak child entity.
Identifying Relationships
The solid line connecting an ID-dependent entity and its parent is called an identifying relationship.
The dashed line connecting strong entities or a non-ID-dependent weak entity to its parent is called a nonidentifying relationship.
Subtype Entities
A subtype entity is a special case of a supertype entity:
STUDENT : UNDERGRADATE or GRADUATE
The supertype contains all common attributes, while the subtypes contain specific attributes. The supertype may have a discriminator attribute which indicates the subtype.
Subtypes with discriminator
Exclusive vs Incluse Subtypes
If subtypes are exclusive, one supertype relates to at most one subtype.
If subtypes are inclusive, one supertype can relate to one or more subtypes.
Partial vs Total Subtypes
If a supertype has to be in one of the subtypes, then the subtypes are total subtypes.
If a supertype does not have to be in any of the subtypes, then the subtypes are partial subtypes.
Associative entity
An entity that holds one or more additional attributes beyond the identifiers of the parent entities is called an associative entity (or association entity)─in this case Price is the additional attribute
Archetype/instance pattern
The archetype/instance pattern occurs when the ID-dependent child entity is the physical manifestation (instance) of an abstract or logical parent.
Recursive relationship
A recursive relationship occurs when an entity has a relationship to itself.