A follow up question concerning the DAL layer part .. The first question about dealing with large objects
I have one table (PlacesTable) that is connected by like 6 other tables (1:Many and Many:Many relations)
In my DAL should I put a big query that join the 6 tables + the m:m reference tables (btw it produces multiple data that I don’t need Please refer to my old question) and place all the data in it’s specific object property or, should I use a single query for each table and create an object for each fetched table .. and finally send those to the UI ?
If I wasn’t clear enough please let me know what I further information do you need to know!
Thanks in advance for your time and help =)
You are better off with a single query returning all the information required for the UI.
Each database connection will be slow and you will have to wait for all of them to finish before having your data ready for the UI.
The slowest thing between the application and the SQL server is the act of establishing connections – the less of them, the better.