Where to add these extra fields?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table tblDaily_Attendance for calculating the Check In-Time for the
day and Check Out-Time for the day , Breaks, Food break,Gross Hours worked,
Net hours worked,etc.
Now my senior wants me to add a condition where an employee can check-In for
the same day for the second time (reason may be due to some urgent work that
has come up for the employee and he was called again to work upon).
The possible fields that I could think of for this condition are -
IT2_Day (In-Time no 2 for the Day)
OT2_Day(Out-Time no 2 for the Day)
OT2_Break1(Out-Time no 2 for the 1st Break) - taking a break
IT2_Break1(In-Time no 2 for the 1st Break) - back from a break
similarly for break2, break3 and lunch.
Should I add these fields to the same table or should it be taken as a
seperate table? because Checking-In for the day for the second time is a rare
case, if I add these fields to the same table, all these fields would be
blank for almost all the records except 1 or 2 cases.
 
I have a table tblDaily_Attendance for calculating the Check In-Time
for the day and Check Out-Time for the day , Breaks, Food break,Gross
Hours worked, Net hours worked,etc.
Now my senior wants me to add a condition where an employee can
check-In for the same day for the second time (reason may be due to
some urgent work that

If the thing you are recording is actually CheckIns rather than Days,
then it's simple just to start another record to the table:

Employee Date TimeIn TimeOut ReasonForLeaving
======== ========== ====== ------- ----------------
Eric 2006-03-12 09:12 11:22 Morning Break
Eric 2006-03-12 11:37 12:02 Urgent Work
Eric 2006-03-12 15:15 17:24 End of day


Remember that fields are expensive but records are cheap. If you like,
you can set a ValidationRule to prevent a new checkin when there is an
old one without a TimeOut value.

Hope that helps


Tim F
 
OR Is it OK to have two records in the table tblDaily_Attendance for the
employee for the same day?
ie Can I add a new record for this employee for the second CheckIn -
CheckOut for the day?
Which option would I go with-
1.Editing the existing record of the employee in the table tblDaily_Attendance
2.Adding a record in the table tblCheck_In2 with primary key of table
tblDaily_Attendance as the foreign key in the table tblCheck_In2
3.Adding a new record for the employee in the table tblDaily_Attendance.
 
Back
Top