update records in database