Optionality

A relationship can be optional or mandatory.
If the relationship is mandatory
an entity at one end of the relationship must be related to an entity at the other end.
The optionality can be different at each end of the relationship
For example, a student must be on a course. This is mandatory. To the relationship
`student studies course' is mandatory.
But a course can exist before any students have enrolled. Thus the relationship
`course is_studied_by student' is optional.
To show optionality, put a circle or `0' at the `optional end' of the relationship.

As the optional relationship is `course is_studied_by student', and the optional part of this is the student, then the `O' goes at the student end of the relationship connection.
It is important to know the optionality because you must ensure that whenever you
create a new entity it has the required mandatory links.

0 comments