updating database model