How to draw ER diagram for recursive relation when the number of roles is more than 3

database-designoraclerecursive

I know for a recursive relation where there are 2 roles, for example:
Worker works for Manager
and Worker and Manager both are 2 roles of Employee, we show it this way:

enter image description here

But what if Employee had roles like:
1. Director
2. Manager
3. Secretary
4. Worker
and every role in the lower hierarchy works for the ones in the higher rank.

For Example:
Manager works for Director, Secretary works for Director and, Worker Works for Director

Then again,
Secretary and Worker also Works for Manager and so on…

How to show that in the ER DIAGRAM?

Best Answer

Organisations are generally far more flexible than we initially think. For example, Jon might have two jobs in the organisation (Developer and Acting Team Lead).

He may report to Bill the Development Manager for his Acting Team lead role and to Bob for the Development work that he still carries out.

This necessitates having the self referencing relationship for REPORTS_TO expand out into another entity type so that each person can report to many others rather than just one. You also need to be able to show that each person can have many roles/jobs and the you may want to have some roles that officially report to multiple roles.

enter image description here

From another perspective hierarchies like this are worth exploring in a graph database as that is what they excel at. Not having a formal schema also means that they are very flexible.