|Just another Perl shrine
Re^2: perl & SQL best practicesby JavaFan (Canon)
|on Apr 27, 2012 at 22:38 UTC
by all means, do table joins on the database side, for exampleBy all means? Joins are costly, and considering there typically are more clients than servers, there are a lot of situations were it makes sense to do the join on the client -- there's a lot more client CPU available than server CPU. In other cases, it does make sense to do it on the database side.
Answers like "by all means" are fundamentally wrong.
Make use of uniqueness constraints, normalize the schema as well as you can.Again, the answer is, it depends. One of the steps to rise above grasshopper level is to know what normalization is, when it's useful, and, as importantly, when it makes sense to not normalize. If you're a bank, you may care more about avoiding data redundancy than when you're serving many million customers on a daily bases, and page delivery time is essential.