milkman2500
Registered User.
- Local time
- Today, 10:19
- Joined
- Oct 21, 2012
- Messages
- 45
Hi,
I'm trying to find the best way to handle hierarchical relationships for employees in an access database.
I currently have a table that simply holds each employee ID and their manager ID. I've then created a query using this method:
http://msdn.microsoft.com/en-us/library/office/aa188216(v=office.10).aspx
The problem is the company I've created this for has thousands of employees and around 10 layers (which requires 10 copies of the table in the query). I need the hierarchy for other reports and have included this query in other queries. I'm finding it slowing things down and may not be the best approach for this hierarchy.
Can anyone recommend an alternative they use?
Would it be better to maintain all 10 layers of management in the original table? So for example:
employee_Id
manager1_id
manager2_id
manager3_id
etc...
This won't be as dynamic but might be faster to use in other queries/reports. What do you think?
I'm trying to find the best way to handle hierarchical relationships for employees in an access database.
I currently have a table that simply holds each employee ID and their manager ID. I've then created a query using this method:
http://msdn.microsoft.com/en-us/library/office/aa188216(v=office.10).aspx
The problem is the company I've created this for has thousands of employees and around 10 layers (which requires 10 copies of the table in the query). I need the hierarchy for other reports and have included this query in other queries. I'm finding it slowing things down and may not be the best approach for this hierarchy.
Can anyone recommend an alternative they use?
Would it be better to maintain all 10 layers of management in the original table? So for example:
employee_Id
manager1_id
manager2_id
manager3_id
etc...
This won't be as dynamic but might be faster to use in other queries/reports. What do you think?