bddewell408
Technical User
Request Help Designing a Database
I am trying to build a database to track schedules and automatically schedule workers for supervisors. My problem, our company has nine different rotations per shift, six shifts (day shift, evening shift, midnight shift/split between north and south). We also work a five days on, three days off type rotation except for the 14 day rotation, which works the standard workweek. At least we don’t have to worry about rotating shifts, we are assigned shifts based on seniority permanently for 1 year. Luckily, Excel can duplicate patterns, and quickly, and I have already got the base information of days off per rotation through 2010, and then imported that into Access.
Here are the tables I have designed or thought about designing so far:
Table 1: Employee Information
Employee ID – Primary Key 000-00-0000
Employee Name John Q Employee
Rotation Number 1,2,3,4,5,6,7,8,14 day
Shift Assignment Mid South, Mid North, Day South, etc
Table 2: Scheduletableversion1
Autonumber –primary key 000000000
Date Sample Data 00/00/0000
Rotation Number Sample Date 1,2,3,4,5,6,7,8, 14 day
Leave Code Sample data Null (means working), D (Day Off), AL (Vacation), SL (Sick Leave), etc
Table 3: Scheduletableversion2
Date- Primary key 00/00/0000
Rotation 1 Null, D, AL, SL
Rotation 2 Null, D, AL, SL
Rotation 3 Null, D, AL, SL
Rotation 4 Null, D, AL, SL
Rotation 5 Null, D, AL, SL
Rotation 6 Null, D, AL, SL
Rotation 7 Null, D, AL, SL
Rotation 8 Null, D, AL, SL
14 day cycle Null, D, AL, SL
Table 4: Employee Leave Table
Autonumber – Primary Key 00000000
Date 00/00/0000
Employee ID 000-00-0000
Leave Code Null, D, AL, SL
Table 5: Scheduletableversion3 (This is simply table2, with table 4 added to consolidate the data)
Autonumber – Primary Key 000000000
Date 00/00/0000
Rotation Number 1,2,3,4,5,6,7,8, 14 day
Employee ID 000-00-0000
Leave Code Null, D, AL, SL
My trouble comes from how to combine the information. I know there must be a way to extract the information using queries (I do not know Visual Basic, but would be willing to try if that is what anyone thinks it will take.)
What I want to try to do is create a base parameter query so that a schedule will be brought up by date on an Access Form.. Hopefully the below diagram will help.
Schedule for [date from parameter query]
[query of all employees working, null value from schedule table and then employees linked by rotation number (if that is possible)]
[Query of all employees not working and the code reasons why]
I can do the next myself, I am going to have 25 unbound text boxes to enter where employees will be working, and plan to protect the above queries so they can not be modified.
I plan on creating many queries to divide everything north/south then day/evening/midnight.
I was hoping to build something that would never need maintenance, but seeing as how employees rotate shifts, rotation numbers, and leave, I will probably need to archive the data every year at the shift change.
If anyone thinks this is also too hard, let me know that as well.
I am trying to build a database to track schedules and automatically schedule workers for supervisors. My problem, our company has nine different rotations per shift, six shifts (day shift, evening shift, midnight shift/split between north and south). We also work a five days on, three days off type rotation except for the 14 day rotation, which works the standard workweek. At least we don’t have to worry about rotating shifts, we are assigned shifts based on seniority permanently for 1 year. Luckily, Excel can duplicate patterns, and quickly, and I have already got the base information of days off per rotation through 2010, and then imported that into Access.
Here are the tables I have designed or thought about designing so far:
Table 1: Employee Information
Employee ID – Primary Key 000-00-0000
Employee Name John Q Employee
Rotation Number 1,2,3,4,5,6,7,8,14 day
Shift Assignment Mid South, Mid North, Day South, etc
Table 2: Scheduletableversion1
Autonumber –primary key 000000000
Date Sample Data 00/00/0000
Rotation Number Sample Date 1,2,3,4,5,6,7,8, 14 day
Leave Code Sample data Null (means working), D (Day Off), AL (Vacation), SL (Sick Leave), etc
Table 3: Scheduletableversion2
Date- Primary key 00/00/0000
Rotation 1 Null, D, AL, SL
Rotation 2 Null, D, AL, SL
Rotation 3 Null, D, AL, SL
Rotation 4 Null, D, AL, SL
Rotation 5 Null, D, AL, SL
Rotation 6 Null, D, AL, SL
Rotation 7 Null, D, AL, SL
Rotation 8 Null, D, AL, SL
14 day cycle Null, D, AL, SL
Table 4: Employee Leave Table
Autonumber – Primary Key 00000000
Date 00/00/0000
Employee ID 000-00-0000
Leave Code Null, D, AL, SL
Table 5: Scheduletableversion3 (This is simply table2, with table 4 added to consolidate the data)
Autonumber – Primary Key 000000000
Date 00/00/0000
Rotation Number 1,2,3,4,5,6,7,8, 14 day
Employee ID 000-00-0000
Leave Code Null, D, AL, SL
My trouble comes from how to combine the information. I know there must be a way to extract the information using queries (I do not know Visual Basic, but would be willing to try if that is what anyone thinks it will take.)
What I want to try to do is create a base parameter query so that a schedule will be brought up by date on an Access Form.. Hopefully the below diagram will help.
Schedule for [date from parameter query]
[query of all employees working, null value from schedule table and then employees linked by rotation number (if that is possible)]
[Query of all employees not working and the code reasons why]
I can do the next myself, I am going to have 25 unbound text boxes to enter where employees will be working, and plan to protect the above queries so they can not be modified.
I plan on creating many queries to divide everything north/south then day/evening/midnight.
I was hoping to build something that would never need maintenance, but seeing as how employees rotate shifts, rotation numbers, and leave, I will probably need to archive the data every year at the shift change.
If anyone thinks this is also too hard, let me know that as well.