What I was taught in the university was we don't save the results in the database, but only the raw data which need for the calculation. For a very basic example,
a + b + c = z
we only save a, b and c in the database. whenever we need z, we retrieve a, b and c from the database and calculate z at the software layer.
Imagine if the calculation is changed at some point.
2(a + b) + c = z
We still have the raw data and only need to change the calculation at the software.
But what if we need to keep track of which calculation was originally used to calculate z? Can we do that without saving the result (z in this case) in the DB?