×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Best way to setup tables for multible related data sets

Best way to setup tables for multible related data sets

Best way to setup tables for multible related data sets

(OP)
I have been asked to set up a DB that shows employees and their managers. This will requires all managers in the management chain to be included. There
are 6 layers from the employee to the top. The data available includes: employee ID, employee name, managers ID. This data is consistent through all levels of employment.

How best to set this up is bothering me. I need to set it up so if any employee/manager moves position, or leaves, the relationships will update automatically.

So, if a 2nd level manager leaves I should be able to replace his name and ID and all relationships are updated. The complication could grow when employees/managers advance in their positions.

Does anyone have any ideas on how to set this up. Tables - 1 0r more? Type of queries?

Any help will be appreciated.

Thanks,

John

RE: Best way to setup tables for multible related data sets

I would consider a table of all employees and a table of positions. Each employee has a position as well as a position they report to.

tblEmployees
======================
empEmpID    primary key
empFirstName
empLastName
empPosID    link to tblPositions for this employee
empSupPosID link to tblPositions for supervisor



tblPositions
=======================
posPosID    primary key
posTitle 


Another possible solution would have

tblEmployees
======================
empEmpID    primary key
empFirstName
empLastName
empPosID    link to tblPositions for this employee

tblPositions
=======================
posPosID    primary key
posTitle    
posReportsPosID 




Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close