a rudimentary implementation of db_update