3.6 Roles
In a relationship, each entity has a function called its role in the relationship. Usually, it is clear from the context what role an entity plays in a relationship. Thus, in the relationship Teach connecting Faculty and Class in Figure 3.1, it is understood that the Faculty entity plays the Teaches role in the relationship, while the Class entity plays the isTaughtBy role.
When an entity set is related to itself in a recursive relationship, it is necessary to indicate the roles that members play in the relationship. The Manages relationship between a manager (who is also an employee) and the other employees he or she manages, discussed in Section 3.5.1 and shown in Figure 3.5, is a recursive one-to-many relationship. The manager plays ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access