7. ENTITY RELATIONSHIP MODELLING

7.4.1: Degree

image
               Figure 7.17: Binary relationship involves two entity types

We consider the degree as the number of entities that participate in the relationship. When we speak of a student enrolling in a course, we are considering a relationship (say, the enroll in relationship) where two entity types (Student and Course) are involved. This relationship is of degree 2 because each instance of the relationship will always involve one student entity and one course entity.

With binary relationships there must be two defining statements we can express, one from the perspective of each entity type. In this case our statements are:

      • A student may enroll in any number of courses.
      • A course may have any number of students enrolled.

Many database modeling tools only support binary relationships. However, there are situations where relationships of higher degree are useful. A relationship involving 3 entity types is called ternary; more generally we refer to relationships with n entity types as n-ary. Our primary focus in this text is on binary relationships.

License

Share This Book