4
votes

I want to know how to create multiple relationship between particular two nodes in neo4j with different property values.

For example in the below picture, 'Super user' and 'data classification' was different node and i want relationships like the picture shown.

enter image description here

1

1 Answers

5
votes

Neo4j support multiple relationships (edges) between two nodes of the graph.

If you are using Cypher for working with Graph here is Query for your example:

CREATE (su:SuperUser { name:'Super User'}) //Create Node with Label SuperUser and property Name with value 'Super User'
CREATE (dc:DataClassification { name:'Data Classification C'}) //Create Node with Label DataClassification and property Name with value 'Data Classification C'
CREATE (su)-[:READ]->(dc) //Create relationship with Label READ
CREATE (su)-[:CREATEUPDATE]->(dc) //Create relationship with Label CREATEUPDATE
CREATE (su)-[:DELETE]->(dc) //Create relationship with Label DELETE