In the system, there was a task_id associated with pretty much anything an employee 
could work on per project...

In addition there was a project for 'overhead', which had tasks like vacation, sick, 
maternity, etc... 

so when the person entered their time, they put 8 hours toward their vacation time task

you could tweak the task_id column to become time_type enumeration allowing p,v,s as 
values if you like....

> -----Original Message-----
> From: Syed Ali [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 29, 2003 2:46 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Representing time sheet data in Mysql
> 
> 
> So if you needed to know status of a work day for an employee 
> day (say 9/1/2003), how did you go about looking it up in your table?
> Assuming that a employee can be present (p), on vacation (v), 
> sick day (s)?
> Your table seems to store only the number of hours worked....
> 
> Thank you,
> Syed Ali
> (609) 951-2989
> 
> 
> 
> -----Original Message-----
> From: Dan Greene [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 29, 2003 11:12 AM
> To: Syed Ali; [EMAIL PROTECTED]
> Subject: RE: Representing time sheet data in Mysql
> 
> 
> In the last timetracking system I built, I used a 'timeentry' 
> table which was basically
> 
> timeentry_id (pk) 
> employee_id 
> date 
> num_hours_worked
> task_id
> 
> I put a few other indexes in there based on the searching 
> that I had to do, but to each their own...
> 
> 
> > -----Original Message-----
> > From: Syed Ali [mailto:[EMAIL PROTECTED]
> > Sent: Monday, September 29, 2003 11:04 AM
> > To: [EMAIL PROTECTED]
> > Subject: Representing time sheet data in Mysql
> > 
> > 
> > 
> > Hello,
> > 
> > I am trying to store our timesheet data in the Mysql database.
> > I would appreciate suggestions on the database scheme to use.
> > 
> > One of the possible ways to do it is to have a table indexed 
> > with the employee ID and then having as many columns as there 
> > are days in the year.
> > This approach would mean that the table has 200 rows if we 
> > have 200 employees and it has 365 columns for each day of the year.
> > 
> > Another approach would be to index based on the number of 
> > days, i.e., have 365 rows and have as many columns as 
> > employees, i.e., 200 columns.
> > 
> > If an employee takes half a day off, then I can store an 
> > array in the value for that employee ID and that particular day.
> > 
> > I am sure there are other approaches to, and I would 
> > appreciate any suggestions.
> > 
> > 
> > Thank you...
> > 
> > 
> 

Reply via email to