Update the database and model