How can you calculate the value - quite simply in this case - it is redundant. You will almost never store redundant data. This means that in every place where you update the price or people, you must definitely update the total quantity. If you forget to do this even in one place, the data is now incompatible. Suppose you now have an entry that says price = $ 10, people = 3, total = $ 40. If you have different programs that display information in different ways - different results or subsets or something else - the user may receive different answers to the same question depending on how he asked it. Although it’s bad to get the wrong answer, it’s even worse when sometimes you get the right answer, and sometimes the wrong answer, because then it may not be clear how to fix the problem. I mean, if I see a certain client showing 2 people, when he needs to show 3, there is supposedly some screen that I can go to, rename 2 to 3, click "Save" or something else, and it is fixed. But if he says $ 10 times 2 people = $ 30, where can I fix it? How?
You can say that the record is updated only in one place, so there are no problems. But it is today. What if tomorrow or some other programmer adds a new function to perform another type of update?
Now I am working on a system filled with redundant data. Basic information about each of our company products is stored in the "item" table. For each unit in stock, we have a stock record, and instead of just referring to an item record, they copy all the data for each stock unit. When an item is sold, we copy all the data into the sale. If something returns, we copy all the data into the return record. Etc etc. For several other types of entries. This causes endless problems. Once we had a problem when a user ran a query in which they searched for elements with certain characteristics, and the list of hits included elements that did not meet the search criteria. What for? Because the query finds all item records that match the search criteria, which tries to match these item records with stocks by part number ... but some of the stock records did not match the position record for other criteria for various reasons. I am currently working on a problem where expense data is not always copied from accounts to sell records correctly. I would just like to redesign the database to eliminate all redundant data, but it would be a huge project.
Of course, there are times when the penalty for recounting some part of the data is too high. For example, if you need to read thousands of transaction records to calculate the current balance, and you regularly want to display the current balance, this may be too much of a performance burden, and you better keep it redundant. But I would do it very slowly. Make sure this is a really serious performance issue.
Multiplying two numbers together that are in a record that you are already reading? Never. I can’t imagine that this will cause performance problems. If you are a database engine, you cannot multiply two numbers in a tiny percentage of the time it takes to read a record, get a new database engine.