Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Typical employee schedule table layout?

Status
Not open for further replies.

Sypher2

Programmer
Oct 3, 2001
160
US
Just trying to get some feedback on a decent table structure for employee schedules. Would you have a separate field for begin time and end time?

SSN (Primary key)
Sat_Begin
Sat_End
Sun_Begin
Sun_End
etc.

or combine them? Or is there a whole other way to do this that I'm not seeing? Thanks
 
It actually depends on :-
A) How you intend to load in the data
B) How you intend to display the data
C) How you intend to report / analyse the data

If there will be large chunks of empty data
( Eg 7 day week schedule and only 3 days completed ) then it would make more sense to have a different structure like:
SSN (Primary key)
TheDate
BeginTime
EndTime
etc.

If there is any possibility ( now OR in the future ) that a single shift could transcend the boundary of doom {24:00} then the Begin and End times ought to become Date/Times

However, if you are just logging day shift start and finish times for what will, in most cases, be fully populated rows then I'd suggest that the table structure you have is the SIMPLEST to load, display and report - and therefore well worth considering.


'ope-that-'elps.

G LS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top