* update function insert, update with db.