Best way of storing hierarchy data
Posted by: Naresh Hejibu
Date: May 30, 2021 01:49PM

Hi,

Can anybody guide me best way to store hierarchy data?

*Current Structure*
member Table - have all data along with member ID and Role (employee, supervisor, manager etc)
Hierarchy Table - child_id, parent_id. If an A employee reports B supervisor and B supervisor report C manager etc then right now inserting rows like A,B + A,C + B,C etc.

* Challenges *
Query is taking time (even after indexing for large data).
Sometimes an employee might report to 2 supervisors then Insert / update is a big challenge.
Required to show hiearchy data like employee structure like employee - supervisor - manager - sr. manager - VP - CEO like that. So, it is taking more than 1 min to fetch that data.

Is there any better to manage this kind of requirement?

Options: ReplyQuote


Subject
Written By
Posted
Best way of storing hierarchy data
May 30, 2021 01:49PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.