1

I would like a best practice or some direction on how to handle employee data, as I just took ownership of the database management

The table employee looks like this

id employee manager week score
1 john Don 22 10
2 jeff Don 22 8
3 fred Don 22 7

It's updated weekly, because we track performance weekly and that counts towards the manager's performance.

Next week, an employee could have a different manager and performance will count towards that new manager

id employee manager week score
4 john Don 23 10
5 jeff Robert 23 9.2
6 fred Don 23 7

The company has 500 employees and we have 52 weeks in a year, so imagine how big that table is. Is there any recommendation or a best practice to track weekly performance and avoid repeated data in the same table?

1
  • I think I'll keep it like that then. I refer as repetitive like having 20 employees under the same manager during 6 months, I would repeat their registry 24 times and I'd just change the week number. Commented Jun 7, 2022 at 21:55

1 Answer 1

1

From a performance perspective, 500 * 52 = only 26,000 records added per year, so this is a tiny amount of data that you have to support and if it only changes weekly it's not very busy sounding either.

If performance is the context for your question, I wouldn't worry about it at all. - user150011

This table can't be reduced significantly. You can log only weeks where management has been changed for certain employee but this approach requires a lot more complicated code to deal with. – user7895

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.