Jump to content

Scheduling db design


justintoo1

Recommended Posts

Hello,

 

I am making a web form that will help me create schedules for a local cafe. I just need a little help on the design of the tables in the db.

 

I want to enter a day on the webform and an area in the cafe. Then to check the tables to see what emps are able to work in that area on a given day.

 

So far I have four tables. main, emp, avail, area.

 

table 'main' contains : id, emp_id, area_id, avail_id

table 'emp' contains : emp_id, emp_name

 

I'm having a little trouble desiging the last two tables.

 

table 'avail' will have PK avail_id. Now I need a way to track what days of the weeks emp's are availible.  Originaly I had seven columns for each day of the week with a varchar value of 'y' or 'n'.

 

Is there a more effecient way of keep track of days that emp's are avail ?

 

I can worry abt the area 'table' once I figure this out.

 

I'm open to all ideas.

 

Thanks - justin

Link to comment
https://forums.phpfreaks.com/topic/165945-scheduling-db-design/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.