r9186: add attribute caching, improve inititialize-database-type