I really have to disagree on no. 3. Keeping all queries in one place is a good practice:
- it makes it easy to modify queries, since you know where to look for them;
- other modules are not cluttered with SQL statements, which can be long and messy;
- it makes it easy to insert a level of APIs to support more than one flavor of SQL.
| [reply] |