Multiplicity of Binary E/R Relationships

Multiplicity of Binary E/R Relationships

Generally, a binary relationship can connect any member of one of its entity sets to any number of members of the other entity set. On the other hand, it is common for there to be a restriction on the "multiplicity" of a relationship. Assume R is a relationship connecting entity sets E and F. Then: 

● If each member of E can be connected by R to at most one member of F, then we say that R is many-one from E to F. Note that in a many-one relationship from E to F, each entity in F can be connected to many members of E. Likewise, if instead a member of F can be connected by R to at most one member of E, then we say R is many-one from F to E (or equivalently, one-many from E to F).

● If R is both many-one from E to F and many-one from F to E, then we say that R is one-one. In a one-one relationship an entity of either entity set can be connected to at most one entity of the other set.

● If R is neither many-one from E to F or from F to E, then we say R is many-many.

As we talked about in Entity-Relationship Diagrams example, arrows can be used to specify the multiplicity of a relationship in an E/R diagram. If a relationship is many-one from entity set E to entity set F, then we place an arrow entering F. The arrow indicates that each entity in set E is related to at most one entity in set F. Unless there is also an arrow on the edge to E, an entity in F may be related to many entities in E.

Example : Following this principle, a one-one relationship between entity sets E and F is represented by arrows pointing to both E and F. For example, the following figure shows two entity sets, Studios and Presidents, and the relationship Runs between them (attributes are omitted). We assume that a president can run only one studio and a studio has only one president, so this relationship is one-one, as indicated by the two arrows, one entering each entity set.

multiplicity of binary er relationsips

Keep in mind that the arrow means "at most one"; it does not guarantee existence of an entity of the set pointed to. Thus, in above figure, we would expect that a "president" is surely connected with some studio; how could they be a "president" otherwise? However, a studio might not have a president at some particular time, so the arrow from Runs to Presidents truly means "at most one" and not "exactly one". We shall discuss the distinction further in "Referential Integrity in E/R Diagrams".




Tags