batch update nodes and relations