Database functions to wrap logic and SQL queries | Derek Sivers When you make a database-backed app, you have some functions that need to run multiple database queries.