I am trying to create a time keeping system and need to ask how to design a table. I created a table called timecard with these fields: Day1 = firstday of the two week pay period, pped = pay period, typhr = type of hour (sick, vacation...)
Auto_id (PK) int
Emp_id (FK) int
Pped datetime(mm/dd/yyyy)
Day1 float
Typhr int
day2 float
typhr int
day3 float
typhr int
day4 float
typhr int
day5 float
typhr int
day6 float
typhr int
day7 float
typhr int
day8 float
typhr int
day9 float
typhr int
day10 float
typhr int
day11 float
typhr int
day12 float
typhr int
day13 float
typhr int
day14 float
typhr int
certified_by int
cert_date datetime(mm/dd/yyyy)
modified_by int
mod_date datetime(mm/dd/yyyy)
This table layout would work if there are no multiply times for a single day. Example: on day1 I worked 5 hrs of regular time and 3 hours of sick time. How do I account for the 2nd line (3 hours of sick time) or more lines per day?
Auto_id (PK) int
Emp_id (FK) int
Pped datetime(mm/dd/yyyy)
Day1 float
Typhr int
day2 float
typhr int
day3 float
typhr int
day4 float
typhr int
day5 float
typhr int
day6 float
typhr int
day7 float
typhr int
day8 float
typhr int
day9 float
typhr int
day10 float
typhr int
day11 float
typhr int
day12 float
typhr int
day13 float
typhr int
day14 float
typhr int
certified_by int
cert_date datetime(mm/dd/yyyy)
modified_by int
mod_date datetime(mm/dd/yyyy)
This table layout would work if there are no multiply times for a single day. Example: on day1 I worked 5 hrs of regular time and 3 hours of sick time. How do I account for the 2nd line (3 hours of sick time) or more lines per day?