I have a company with different departments, let's say sales, accouting and hr.
For each of them, I would have several particular key performance indicators and for each KPI, a hoped goal with the actual result. In my application, I would set the hoped goals, my users would simply input the actual result, and at the end of the month, I would create a snapshot.
In the application, I should be able to navigate month by month in the past and check their respective information as readonly.
I am trying to figure out a proper way to store monthly snapshots of my tables. Basically, something that would allow a "as-at" view over time.
Should I use a separate table to store historical data such as Sales_History, and keep an original table for the current, active month?
Or rather have only one set of tables and set a timestamp field for each row which would allow me to select the data with a timestamp for the requested month? then, when inputing a value, I update the row with the timestamp in the current month, and when I create a snapshot, I would create new rows with a timestamp for the next month. In any case, there would not be a huge volume of data.
I don't know that there is a particular standard way of doing it but I would appreciate your input as I'm sure it will make my life easier when I start coding.