Stamping Out Cartesian Products

A cartesian product in a single query can make the whole server go slow. The other problem is the result sets, which come back many multiples too big.

No gizmo tool will help you with a cartesian product. No query analyzer will tell you that you have a problem, or how to fix it. Cartesian products are one problem area that only observation, knowledge, and good SQL skills will overcome.

Continue Reading →

Database Design and the Leaning Tower of Pisa

The unfortunate thing in database designs is that unlike programs, they are rarely, if ever, reworked. If a program doesn’t compile, the code is corrected until it does compile. And then if the program doesn’t produce the right output, the code is again corrected until it does. I’ve seen one relatively simple program be refined and put into production at least eight times. … The database design is usually thrown up as quickly as possible …

Continue Reading →