HiveBrain v1.2.0
Get Started
← Back to all entries
patternModerate

Database design for a time tracking application

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
trackingapplicationdesigntimedatabasefor

Problem

I'm designing the database schema for a time tracking application and I need a little piece of advice. The application must permit the user to enter for each day of the week the amount of time he worked for a specific project. What would be, in your opinion, the best way to store these values?

Solution

Have a look at the Timesheet model on databaseanswers.org. This covers it nicely

Simply, a table with

  • Date



  • User (FK to User table)



  • Project (FK to Project table)



  • Time worked



The first 3 columns are PK.

Now, do you want to:

  • log activity eg Analysis, Coding, testing separately?



  • log project phases separately?



  • log non-project work eg training, holidays (eg user focus or project focus?)



  • ...

Context

StackExchange Database Administrators Q#2045, answer score: 14

Revisions (0)

No revisions yet.