comboy
Instructor
- May 23, 2003
- 226
Hi all,
I'm new to sql so if I'm asking something that is plain obvious sorry in advance.
The situation is that I currently have a excel sheet that is used to store schedule information for three trainers
in the following format
DATE | Trainer 1 | Trainer 2 | Trainer 3|
12/1/07 | Mackens | In office | On Course|
My manager wants to place this info into a MySQL DB so that we can develop a php web site to manage the schedule and allow the trainers to view schedule info etc when offsite. I've designed most of the tables whose primary keys are all forigen keys of the schedule table but would like some advice on developing the schedule table in relation to its primary key.
I know that I can't use the date alone as a primary key so I was thinking of using both the Trainer_ID and Day(date) as the primary key as this should allow info for all trainers to be entered for the same date and be flexible enough to allow for growth in the number of trainers without having to edit any external php code etc.
However I was just wondering if I should continue with this method or could someone suggest a better method as I've missed something that an experienced DB admin/developer would spot.
Thanks in advance
Graham.
I'm new to sql so if I'm asking something that is plain obvious sorry in advance.
The situation is that I currently have a excel sheet that is used to store schedule information for three trainers
in the following format
DATE | Trainer 1 | Trainer 2 | Trainer 3|
12/1/07 | Mackens | In office | On Course|
My manager wants to place this info into a MySQL DB so that we can develop a php web site to manage the schedule and allow the trainers to view schedule info etc when offsite. I've designed most of the tables whose primary keys are all forigen keys of the schedule table but would like some advice on developing the schedule table in relation to its primary key.
I know that I can't use the date alone as a primary key so I was thinking of using both the Trainer_ID and Day(date) as the primary key as this should allow info for all trainers to be entered for the same date and be flexible enough to allow for growth in the number of trainers without having to edit any external php code etc.
However I was just wondering if I should continue with this method or could someone suggest a better method as I've missed something that an experienced DB admin/developer would spot.
Thanks in advance
Graham.