I am wondering where should the DB queries need to be in the three tier architecture.
The first association that think is in the DAL. But then if the BL want to search for an object, the DAL need to publish methods for each possible search (Unrealistic - a lot of work).
The second option, is in the BL. But then the BL need to know how the DB designed... (Encapsulation is not good)
The third option, is that the DAL will publish some object like "QueryBuilder" or something similar, and the BL build the query with weak association (but still needed) to the DB.
What is the best option to allow BL to do a search?