The book Pattern of Enterprise Application Architecture has the following description over the Table Data Gateway pattern:
“A Table Data Gateway holds all the SQL for accessing a single table or view: selects, inserts, updates, and deletes. Other code calls its methods for all interaction with the database.”
They do not say anything about queries that use multiple tables. Where do I have to put a query that uses multiple tables and generates a result that has as much in common for every single table?