- Aug 14, 2001
- 12,343
- 0
- 0
Ok, so you wanna make the perfect layout for your database-driven project. You make your classes for all the various things you want classes for, and you design it so it's super elegant and easy and whatnot. But the problem is that every object you instantiate needs to grab data from the database, so you have tons of little queries running around, where the optimal solution (from a database standpoint) would be as few queries as possible. The problem with that solution is that you need to structure everything around database queries, which is less than wonderful design-wise. So what's the solution? IS there one? Or is it just a matter of balancing speed with elegance, depending on the situation?