Entity Relationship Modeling (ER modeling) is by far the most common way to express the analytical result of an early stage in the construction of a new database. In this ebook, Alf Pedersen describes the principles for ER modeling, as well as the most important terms used in modeling a new database.
Entity Relationship Modeling - Many-to-Many (Page 11 of 21 )
As with all many-to-many relationships, we must create an intersection entity, and resolve the many-to-many relationship into two one-to-many relationships:
When naming both ends of relationships, try to find meaningful and descriptive phrases so it feels natural to read the relationships back and forth. Note how we have read all the relationships in this chapter. Avoid, if you can, words like ‘is’, ‘has’, ‘in’. Those are quite meaningless. (Although I cannot help myself, either, at times…)
Using Arcs What is an arc? An arc is a constraint that crosses two or more relationships going into an entity, and it indicates that the relationships in the arc are mutually exclusive. I will explain it with graphics:
The arc in this model tells that for any one transaction, it is either valid for a shareholder, or for a business contact, never both at the same time. In my opinion, arcs are a result of insufficient analysis: We must have both relationships optional and that reduces the strength of referential integrity. Furthermore, it is an indecisive signal: ‘We are not sure here, choose for yourself’. They also give a signal about a possible missing business rule, also.
Try to avoid arcs; however, in an early analysis phase, they are a good signal about a problem domain that has to be explored further.