Identify and merge the duplicate relationship records