code generator based on the database schema and templates