When I make a query, I often wonder about this:
Is it better to add extra field(s) to the table, or just get the values and calculate in your server side language?
For example, table Student contains Student.score field. I want to get the grades.
Do I get the score and make a bunch of if/else/switch for the grades?
Do I waste space by adding a field just to store something that is dependent on another field?
The former is annoying to do everytime you need the grades. The latter scares me when I think of space usage. If I have as small as 10,000 records then I've already wasted 10,000 fields!
Which is the most efficient method, considering non-trivial tables and medium to big database size?
If it matters lets use PHP as the server side language.