update the  database