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...