Everyone keeps saying that saving the results of a query is a bad idea and pointless. I understand that it CAN be bad (if you have something that is going to constantly change), but I still don't understand why it is ALWAYS a bad idea.
For example, I am creating a database for booking education programs at a zoo, scheduling them and reporting on income, numbers of participants, etc. To calculate the total cost of a program, the program price is added to a millage fee and possibly an additional auditorium fee. Once that calculation is made, the event has past and payment complete, why should the database have to rerun the calculations every time it generates an income report?
Especially if that calculation has to be made for every education program (of which we book hundreds each year). Then, in order to compare yearly income, it would have to do that for every single year that is part of the report.
Instead of doing a simple three part addition possibly THOUSANDS of times to generate a income comparison report 3 years down the line, why not save the calculation result at the end of the program, then save the calculation result of total income at the end of the year?
Plus, if anything got lost or screwed up in even one single field of any of these programs, the entire calculation would come up as an error and/or be incorrect.
This is just one example, let alone many others that I think saving would be best. Could someone please tell me why saving is bad?
For example, I am creating a database for booking education programs at a zoo, scheduling them and reporting on income, numbers of participants, etc. To calculate the total cost of a program, the program price is added to a millage fee and possibly an additional auditorium fee. Once that calculation is made, the event has past and payment complete, why should the database have to rerun the calculations every time it generates an income report?
Especially if that calculation has to be made for every education program (of which we book hundreds each year). Then, in order to compare yearly income, it would have to do that for every single year that is part of the report.
Instead of doing a simple three part addition possibly THOUSANDS of times to generate a income comparison report 3 years down the line, why not save the calculation result at the end of the program, then save the calculation result of total income at the end of the year?
Plus, if anything got lost or screwed up in even one single field of any of these programs, the entire calculation would come up as an error and/or be incorrect.
This is just one example, let alone many others that I think saving would be best. Could someone please tell me why saving is bad?