C H A P T E R
7
Database Design and the E-R
Model
This chapter introduces the entity-relationship model in detail. A significant
change in the 6th edition is the change in the E-R notation used in the book. There
are several alternative E-R notations used in the industry. Increasingly, however,
the UML class diagram notation is used instead of the traditional E-R notation used
in earlier editions of the book. Among the reasons is the wide availability of UML
tools, as well as the conciseness of the UML notation compared to the notation
with separate ovals to represent attributes. In keeping with this trend, we have
changed our E-R notation to be more compatible with UML.
The chapter covers numerous features of the model, several of which can be
omitted depending on the planned coverage of the course. Extended E-R features
(Section 7.8) and all subsequent sections may be omitted in case of time constraints
in the course, without compromising the students understanding of basic E-R
modeling. However, we recommend covering specialization (Section 7.8.1) at
least in some detail, since it is widely used in object-oriented modeling.
The E-R model itself and E-R diagrams are used often in the text. It is important
that students become comfortable with them. The E-R model is an excellent context
for the introduction of students to the complexity of database design. For a given
enterprise there are often a wide variety of E-R designs. Although some choices
are arbitrary, it is often the case that one design is inherently superior to another.
Several of the exercises illustrate this point. The evaluation of the goodness of
an E-R design requires an understanding of the enterprise being modeled and
the applications to be run. It is often possible to lead students into a debate
of the relative merits of competing designs and thus illustrate by example that
understanding the application is often the hardest part of database design.
Among the points that are worth discussing when coming up with an E-R
design are:
1. Naming of attributes: this is a key aspect of a good design. One approach
to design ensures that no two attributes share a name by accident; thus, if
ID appears as an attribute of person, it should not appear as an attribute of
51