database schema for timesheet

前端 未结 5 1894
青春惊慌失措
青春惊慌失措 2021-02-02 03:17

Could someone help me with a rough database schema for a timesheet application where the i would be able to

  1. Store hours per day for a time period ( 2 weeks ) fo

5条回答
  •  借酒劲吻你
    2021-02-02 03:50

    A table for people(1)

    A table for projects(2)

    A table for bookings(3) - who did the work (FK into 1), what project did they work on (FK into 2), when did they do the work, how much work did they do.

    Select sum(time_booked) from (3) where person equals (some id from 1) and project = (some ID from 2)

    or

    Select sum(time_booked) from (3) where person equals (some id from 1)

    etc...

提交回复
热议问题