Preferred way of retrieving row with multiple relating rows
问题 I'm currently hand-writing a DAL in C# with SqlDataReader and stored procedures. Performance is important, but it still should be maintainable... Let's say there's a table recipes (recipeID, author, timeNeeded, yummyFactor, ...) and a table ingredients (recipeID, name, amount, yummyContributionFactor, ...) Now I'd like to query like 200 recipes with their ingredients. I see the following possibilities: Query all recipes, then query the ingredients for each recipe. This would of course result