Newbies Ahlqvist Posted April 13, 2014 Newbies Posted April 13, 2014 I'm still working on my schedule solution. So far I have created "Schedule", "Person" and "Shift" -tables that are joined through other tables such as: "PersonShift" and so on... I have connected my persons to the right shift and my shift to the right date in my schedule. My problem is now how to add the right persons to each date. To add persons and dates to shifts was fairly easy with your help but now it is a whole other thing. My table looks like this: __kp_ScheduleShiftPerson _kf_Schedule _kf_Shift _kf_Person 1 1 2 2 2 3 3 3 4 4 4 1 5 5 2 I know in theory what to do but not an easy way to do it. I don't want to manually copy each date and enter every single person in the group that works that day. It would take forever! Please help!! All tips and tricks are very helpful!
eos Posted April 13, 2014 Posted April 13, 2014 I'm still working on my schedule solution. So far I have created "Schedule", "Person" and "Shift" -tables that are joined through other tables such as: "PersonShift" What's the difference between 'Schedule' and 'PersonShift'? A structure like People --< Schedule >-- Shifts, where a Schedule record holds a person_FK, a date and start/end time, lets you derive all other data – e.g. all Schedule records from this week constitute this week's schedule etc. … Normalizing your data is very much desirable, but you can take that too far and create more work (and data) than is necessary. Strictly speaking, unless you have more to say about a shift than its number, you wouldn't even need a Shifts table; OTOH, it's a convenient way to define and store currently applicable start and end times and look them up, instead of using calculations in your script, assuming that you want to store them in the Schedule table to be preserved as 'historical' data. How exactly you would go about populating this Schedule table depends on your workflow and your business rules, e.g. distribute the entire staff over the entire week and using the same slot each time, or changing/scrambling the slots etc. Come up with a plan and try to implement it within a script. To add persons and dates to shifts was fairly easy with your help […] Out of curiosity: that's your first post, so who are you addressing here?
Recommended Posts
This topic is 3887 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now