update  the database