When you have values which only depends on one or more other fields +/- constants (say retail price & discount price), is it better to store those values too or to calculate them “on the fly” when retrieving the data?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would agree with Tomislav – try to avoid redundancy because you can end up with data on multiple tables disagreeing with each other. It makes updates more painful.
There are exceptions that are worth considering, though, that are not related to database performance.