Question about Scheduling Database Table Days of the Week

J

jmDesktop

Hi, I am designing a table that has an employee and the days of the
week they work. Since there is one and only schedule that every
employee will ever have, is there any reason to not have a table that
has:

employee:

employeeid
employeename
sunstart
sunend
monstart
tuestart...and so on
wed..
thur..
frid..
sat..

I admit this is hideous, but I can't think of a reason to have a
second table for the actual schedule. Or is this better, worse,
neither:

employee table:
empid
....

schedule table:
schedid
empid
Day //like 1-7
DayStart //datetime field with work start time
DayEnd //datetime field with work end time for that day

Is either of these correct? Thanks.
 
W

Wayne-I-M

is it a "unique" schedule - if not then you should it in another table and
link it.

If only one employee ever have that particular schedule that it is specific
to the person (like the 1stname and hair colour and date of birth)

OK I know that some people have the same hair colour and date of birth but
.....

Basically if is specific then it goes in the employee table if it not it
should in to another table
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top