Just thinking out-loud, but what design would lend itself to: scheduled break: 11:00-11:15 actual break: 10:30-10:40; 11:20:11:25
the point is to capture the fact that the break was taken not at the scheduled time, as well as the odd duration. Plus, the quantity of breaks. Typically, two breaks per day, but exceptions to that should be flagged with a trigger, as well as odd durations. For quantity, COUNT can come into play. How would the duration of the break be counted? I assume that dates can be subtracted from each other resulting in a duration? Is there some sort of scalar to represent that the break wasn't at the correct time? A metric? I'm thinking that the schedule would be its own table, and then an "events" table to store login/logouts, breaks and meal breaks. Would it make sense for the PK of both tables to be the employee ID number? thanks, Thufir -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]