Hello,
I am setting up a time tracking database which will track employees maintenance times. Several employees spend X number of hours each day maintaining machines from different categories, such as mowing, snow removal, etc.
I am trying to figure out if it is possible to set the tables up in a way which will not require adding an employees wage rate to every time tracking (listed in the time tracking table below) record. To somehow have the table pull data from the most recent wage record for that particular employee. As employees get raises I would like to retain the old rate in the time tracking table along with the new rate for current data.
The way I have the tables setup right now are as follows.
Employee table
- EmployeeID
- FirstName
- LastName
- Address, Phone, etc
Maintenance Categories table
- MaintID
- MaintName
Wage table
- WageID
- EmployeeID
- DateEffective
- CurrentWage
Time Tracking table
- TimeTrackingID
- EmployeeID (lookup from employee table)
- MaintID (lookup from maintenance table)
- WageID (lookup from the wage table)
- DateOfMaintenance
- StartTime
- EndTime
All of the tables have relationships in the time tracking table.
I will be grateful for any input. Thank you.