REQ - Lecture 7
REQ - Lecture 7
REQ - Lecture 7
Lecture 7
Mandatory cardinalities
Optional cardinalities
One mandatory, one optional
Associative Entities
• Associative Entity: an entity type that associates
the instances of one or more entity types and
contains attributes that are peculiar to the
relationship between those entity instances
– Sometimes called a gerund
• The data modeler chooses to model the
relationship as an entity type.
Associative Entities
EXTENDED E-R DIAGRAM
Supertypes and subtypes
• Subtype: a subgrouping of the entities in an
entity type
– Is meaningful to the organization
– Shares common attributes or relationships distinct
from other subgroupings
• Supertype: a generic entity type that has a
relationship with one or more subtypes
Supertype/subtype relationships in a hospital
Supertypes and subtypes
• Total specialization specifies that each entity
instance of the supertype must be a member
of some subtype in the relationship.
– Represented by double lines.
• Partial specialization specifies that an entity
instance of the supertype does not have to
belong to any subtype, and may or may not be
an instance of one of the subtypes.
– Represented by single lines.
Supertypes and subtypes
• Disjoint rule specifies that if an entity instance
of the supertype is a member of one subtype,
it cannot simultaneously be a member of any
other subtype.
– Represented with “d”.
• Overlap rule specifies that an entity instance
can simultaneously be a member of two (or
more) subtypes.
– Represented with “o”.
Example of
supertype/subtype hierarchy