title: Interaction between Business Logic Layer and Database Access layer
body: <p>I am currently implementing a system and I have a question regarding the interaction between different elements in the system with the class that interacts directly with the database (the one opening and closing connections, executing sql queries, etc).</p>
  
  <p>So far, my Business Logic Layer is deferring the construction of <strong>all SQL queries</strong> (depending on certain inputs) to my Database Access Layer, which in turn would call the database-handling class to execute each query. Note that right above my Business Logic Layer is the GUI.</p>
  
  <p>The question is: would it be bad practice to include the construction of SQL queries in the Business Logic Layer? I am asking this because I need to implement a procedure that <strong>gets data from database DB1, manipulates it, and then writes it into DB2</strong>. Thus I find that hardcoding these SQL queries would be easier to keep in my business layer.</p>
  
  <p>Please let me know your thoughts and if this is a clean design to some extent from an architectural point of view, or if I should include this logic all in my Database Access Layer.</p>