neo4j download Download neo4j. Then access via http://localhost:7474
1, create the entity file CSV, you need to include a unique ID (in the way of UUID1)
2, create a relationship CSV, through the entity ID connected;
Import:
Entity 1:
LOAD CSV with HEADERS from "File:///new_entity1.csv" Asline
MERGE (Comp:company{name:line.name,code:line.code})
Entity 2:
LOAD CSV with HEADERS from "File:///new_entity2.csv" Asline
MERGE (Comp:company{name:line.name}) Relationship:
LOAD CSV with HEADERS from ' file:///gudong_relation2.csv ' as Line
Match (from:company{id:line.from_id}), (to:company{id:line.to_id})
Merge (from)-[r: main shareholder {shareholding:line.property}]-> (to)
Query all nodes and relationships:
Start n = node (*)
return n
Find:
MATCH (com:company{name: "Vanke a"})-[main shareholder]-(Com2:company) return com,com2
deleting nodes and relationships
MATCH (n)-[r]-()
DELETE N,r
Simply delete so node:
Match (N)
Delete N