Templates, and database retrieval