[thelist] Storing Schedules in a database - Best Practices???

rahaman rahaman29 at gmail.com
Thu Feb 7 05:17:05 CST 2008


i too doing the same for an healthcare project storing daily time of workers
.you should have masteremp table with empid and a separate timecard table to
store empid and date,hours,task,etc

u can fetch using date for specific month,year and day. hope this info will
be useful to u..


On 2/7/08, Daniel Burke <dan.p.burke at gmail.com> wrote:
>
> You could get away with pretty much anything, several hundred workers is
> nothing in the face of a quad core xeon.
> I don't know your structure, but personally I'd describe the shifts, and
> have another table assigning workers to them for given days.
> If for whatever reason your queries end up taking entire seconds, convert
> them to stored procedures.
>
> On Feb 7, 2008 3:53 PM, Jay Turley <jayturley at gmail.com> wrote:
>
> > Hi all-
> >
> > I am working on a schema for a database which will hold work
> > schedules, i.e. dates and times that people will be working.
> >
> > I'm not sure what the best way is to represent the scheduled shifts.
> >
> > You could have a bit column for each shift, together with a date and a
> > foreign key for the worker.
> >
> > You could have a varchar(X) field (where X is the number of shifts to
> > be managed) instead of the bit columns, or you could even have a INT
> > and use bitwise operations in the business logic.
> >
> > Or you could have a shifts table and use it as foreign key into a
> > many-to-many table along with the foreign key from the worker table
> > and a date.
> >
> > I'm curious if anyone out there has any experience with representing
> > this stuff and is willing to throw a few bones my way.
> >
> > My biggest worry is getting the data for an entire month out in a
> > reasonable amount of time, given an organization with several hundred
> > workers.
> >
> > Any help is greatly appreciated.
> >
> > Thanks!
> >
> > -Jay
> > --
> >
> > * * Please support the community that supports you.  * *
> > http://evolt.org/help_support_evolt/
> >
> > For unsubscribe and other options, including the Tip Harvester
> > and archives of thelist go to: http://lists.evolt.org
> > Workers of the Web, evolt !
> >
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>



More information about the thelist mailing list