Database Reference
In-Depth Information
EMPLOYEE
N:M
SKILL
(a) Original E-R Model Version
EMPLOYEE
SKILL
Figure 5-9
Two Versions of an N:M
O-M Relationship
(b) Crow's Foot Version
a circle indicates zero (and thus optional), and the crow's foot symbol indicates many. Note that,
as indicated in Figure 5-8, we can read the symbols in either purely numeric (“exactly one”) or
semi-numeric (“Mandatory-One”) terms, and which reading is used is a matter of preference.
Thus, the diagram in Figure 5-7(b) means that a DEPARTMENT has one or more
EMPLOYEEs (the symbol shows many and mandatory), and an EMPLOYEE belongs to zero or
one DEPARTMENTs (the symbol shows one and optional).
A 1:1 relationship would be drawn in a similar manner, but the line connecting to each entity
should be similar to the connection shown for the one side of the 1:N relationship in Figure 5-7(b).
Figure 5-9 shows two versions of an N:M, optional-to-mandatory relationship. Modeling
N:M relationships presents some complications. According to the original E-R model dia-
gram shown in Figure 5-9(a), an EMPLOYEE must have at least one SKILL and may have
several. At the same time, although a SKILL may or may not be held by any EMPLOYEE,
a SKILL may also be held by several EMPLOYEEs. The crow's foot version in Figure 5-9(b)
shows the N:M maximum cardinalities using the notation in Figure 5-8. The crow's foot
symbols again indicate the minimum cardinalities for the N:M relationship.
Except for Appendices C and D, for the rest of this text, we will use the IE Crow's Foot
model for E-R diagrams. There are no completely standard symbols for the crow's foot nota-
tion, and we explain our symbols and notation when we first use them. You can obtain various
modeling products that will produce crow's foot models, and they are easily understood and
related to the original E-R model. Be aware that those other products may use the oval, hash
mark, crow's foot, and other symbols in slightly differently ways. Further, your instructor may
have a favorite modeling tool for you to use. If that tool does not support crow's feet, you will
have to adapt the data models in this text to your tool. Making these adaptations is a good
learning exercise. See, for example, exercises 5.57 and 5.58.
By ThE Way A number of modeling products are available, and each will have its own
idiosyncrasies. CA Technologies produces ERwin, a commercial data
modeling product that handles both data modeling and database design tasks. You
can download the CA ERwin Data Modeler Community Edition, which is suitable for
class use, from www.ca.com/us/software-trials.aspx . You can use ERwin to produce
either crow's foot or IDEF1X data models.
Microsoft Visio is a possibility. A trial version is available from the Microsoft Web site
at http://office.microsoft.com/en-us/visio/. See Appendix F for a full discussion of using
Microsoft Visio for data modeling.
Finally, Oracle is continuing development of the MySQL Workbench, as described in
this topic in Chapters 2 and 10B, and a free (but somewhat limited) version is available
at the MySQL Web site at http://dev.mysql.com/downloads/tools/workbench/5.2.html.
(If you are using a Microsoft operating system, you should install the MySQL Workbench
by downloading and running the MySQL Installer for Windows at http://dev.mysql.com/
downloads/installer . ) Although it is better at database designs than data models, it is a
very useful tool, and the database designs it produces can be used with any DBMS, not
just MySQL. See Appendix E for a full discussion of using MySQL Workbench for data
modeling and database designs.
 
 
Search WWH ::




Custom Search