3.3 Relationships and Cardinality Ratios

A RELATIONSHIP TYPE represents an association between two or more entity types. In ER diagrams, relationships are drawn as DIAMONDS connected to the participating entity types.

RELATIONSHIP EXAMPLES from Newgate University:

1.    STUDENT ENROLS-IN COURSE

2.    LECTURER TEACHES COURSE

3.    STUDENT BELONGS-TO DEPARTMENT

4.    STAFF HAS DEPENDENT

Cardinality Ratios

Cardinality describes the maximum number of times an entity instance in one entity type can be associated with instances of another entity type.

Cardinality

Notation

Nigerian Example

One-to-One (1:1)

1 — 1

One STAFF member has exactly one NIN (National Identity Number)

One-to-Many (1:N)

1 — N

One DEPARTMENT has many STUDENTS; each STUDENT belongs to one DEPARTMENT

Many-to-Many (M:N)

M — N

Many STUDENTS enrol in many COURSES; each COURSE has many STUDENTS