Neo4J - How to create a new node based on splitting an existing relationship property and automatically creating a link?

Viewed 853

I have a network of nodes which represent People which are connected by relationships (Emails).

The Receiver of the Email is m.slug

Based on: ()-[r]-(m)

I wish to split the property (in this case "Sender" / m.slug ie Larry@google.com)and create a new node "Google.com" AS Company (i.e so I now have a set of Company nodes created from the existing information).

I want to then link Google (the company) to my Person Node (Larry@Google.com).

--

How would you approach this, without creating multiple duplicate Company nodes? (i.e for Sergey@Google.com & Larry@Google.com should be connected to the same Google.com Company Node).

Visual Representation of People and relationships

Example syntax of queries and relationship properties

1 Answers
Related