Added support for database templates