The question can be re-interpreted as "Where do you want to keep your business logic?"
Business logic is the core functionality for your system that defines how you want it to work.
You can choose to put your business logic in your DB (ie as stored procedures, stored functions, table constraints, etc) or in your application code (ie in software functions which then generate queries).
This is an architectural decision, but in general I would recommend only using SPs where it makes sense (eg for a query that is repeated often in numerous places in your code, or for specific performance in an area where you really need it and where using an SP would make a real difference).
Here's a link to an article which may help: http://c2.com/cgi/wiki?BusinessLogicInStoredProcedures