I know that:
No, you would never store a value that could be calculated from other columns in the database. Storing calculated values is a violation of database normalization.
But what about the calculated value from the relational table? For example, amount in orders is calculated from the order_products table with the formula sum (price * qty). Should I save this value in the orders table?. Thanks.
question from:https://stackoverflow.com/questions/66059496/mysql-should-a-field-be-created-to-store-the-relational-table-calculation