Hello all. I am having trouble making db of Employee working trace.
The clerks in the company wants that the form of inserting one work trace to look like this.
Month / Year (Entered by the clerk)
Employee Id (Entered by the clerk)
Day In Month (Locked value) Day in week (locked value) Start Hour End Hour (could be many)
1 Sunday 10:30 - 12:30
2 Monday 11:30 - 12:30 AND 14:30 - 16:30
3 Tusday 14:40 - 16:30 AND 00:00 - 03:00 AND 06:00 - 07:00
....31 (depend on month) and etc etc...
As u see in the example. The user only needs to insert the start Hour and End hour. Day within month and day within week are locked values.
One problem to be addressed is what happens if the employee worked in one day two shifts?
I really don’t know how to do the db. I tried several ways, none of them are good.
The clerks in the company wants that the form of inserting one work trace to look like this.
Month / Year (Entered by the clerk)
Employee Id (Entered by the clerk)
Day In Month (Locked value) Day in week (locked value) Start Hour End Hour (could be many)
1 Sunday 10:30 - 12:30
2 Monday 11:30 - 12:30 AND 14:30 - 16:30
3 Tusday 14:40 - 16:30 AND 00:00 - 03:00 AND 06:00 - 07:00
....31 (depend on month) and etc etc...
As u see in the example. The user only needs to insert the start Hour and End hour. Day within month and day within week are locked values.
One problem to be addressed is what happens if the employee worked in one day two shifts?
I really don’t know how to do the db. I tried several ways, none of them are good.
Last edited: