Overview

In this chapter we will be looking at the extensions that have been added to the E/R diagram and how they can aid in diagramming the enterprise.

EER Model

The enhanced entity-relationship model has added several additional new pieced.  The most important one is the supertype/subtype relationship.  The EER also has added business rules into the diagram if needed.

Supertype/subtype

A supertype is a generic entity type that has a relationship with one or more subtypes

A subtype is a subgrouping of the entities in an entity type that is meaningful to the organization and that shares COMMON ATTRIBUTES or relationships distinct from other subgroupings.

example:

EMPLOYEE

Emp_number

Emp_lastname

Emp_firstname

date_hired

                                                                    |

                                                                  O

                                                /                   |                   \

                        HOURLY EMP         SALARIED EMP        CONSULTANT

                        Hourly_rate                 Annual_salary              Contract_number

                                                          Stock_option                Billing_rate

Each of the subtypes:  HOURLY EMPLOYEE, SALARIED EMPLOYEE, and CONSULTANT all share the attributes that are listed with the Supertype EMPLOYEE. They have additional unique attributes that are part of them as well.  You don't repeat the shared attributes from the supertype down to the subtype - it is known that they are "inherited" from the supertype.

Constraints

There are additional constraints that can be added to supertype/subtype relationships.  These are:

1.  completeness - whether an instance of a supertype must also be a member of at least one subtype

a.  total specialization rule - each entity instance of the supertype MUST be a member of some subtype in the relationships

b.  partial specialization rule - an entity instance of the supertype is allowed NOT to belong to a subtype

2.  Disjointness Constraint - whether an instance of a supertype may simultaneously be a member of two (or more) subtypes

a.  Disjoint rule - an instance of a supertype may NOT simultaneously be a member of two (or more) subtypes

b.  Overlap rule - an instance of a supertype MAY simultaneously be a member of two (or more) subtypes

Business rules

Business rules have also been added to E/R diagrams.  They are diagramed using an arrow-head and an accompanying list of the rule.