From 81d6bcce8313ea8ba1a9c5aadbc8a358254d5a95 Mon Sep 17 00:00:00 2001 From: J1e9n9n1y <144667442+J1e9n9n1y@users.noreply.github.com> Date: Mon, 16 Oct 2023 15:04:18 +0200 Subject: [PATCH] add files to create example data in the neo4j database using cypher --- example data/NodeCreation.cypher | 8 ++++++++ example data/RelationshipCreation.cypher | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 example data/NodeCreation.cypher create mode 100644 example data/RelationshipCreation.cypher diff --git a/example data/NodeCreation.cypher b/example data/NodeCreation.cypher new file mode 100644 index 0000000..9d3aa57 --- /dev/null +++ b/example data/NodeCreation.cypher @@ -0,0 +1,8 @@ +CREATE p1 = (:Order {id:'1'})-[:HAS_INVOICE]->(:Invoice {price: 100, id: '1', discount:5, invoicing_amount:95}) +CREATE p2 = (:Order {id:'2'})-[:HAS_INVOICE]->(:Invoice {price: 200, id: '2', discount:5, invoicing_amount:195}) +CREATE p3 = (:Order {id:'3'})-[:HAS_INVOICE]->(:Invoice {price: 100, id: '3', discount:5, invoicing_amount:95}) +CREATE p4 = (:Order {id:'4'})-[:HAS_INVOICE]->(:Invoice {price: 200, id: '4', discount:5, invoicing_amount:195}) +CREATE p5 = (:Order {id:'5'})-[:HAS_INVOICE]->(:Invoice {price: 100, id: '5', discount:5, invoicing_amount:95}) +CREATE p6 = (:Order {id:'6'})-[:HAS_INVOICE]->(:Invoice {price: 200, id: '6', discount:5, invoicing_amount:195}) +CREATE p7 = (:Order {id:'7'})-[:HAS_INVOICE]->(:Invoice {price: 1000, id: '7', discount:100, invoicing_amount:900}) +CREATE p8 = (:Order {id:'8'})-[:HAS_INVOICE]->(:Invoice {price: 800, id: '8', discount:10, invoicing_amount:790}) \ No newline at end of file diff --git a/example data/RelationshipCreation.cypher b/example data/RelationshipCreation.cypher new file mode 100644 index 0000000..5e9bd46 --- /dev/null +++ b/example data/RelationshipCreation.cypher @@ -0,0 +1,9 @@ +MATCH (o1:Order {id:'1'}),(o2:Order {id:'2'}),(o3:Order {id:'3'}),(o4:Order {id:'4'}),(o5:Order {id:'5'}), (o6:Order {id:'6'}), (o7:Order {id:'7'}), (o8:Order {id:'8'}) +MERGE (c1:Customer {name:'Eiffeltum',longitude: 2.2668765, latitude: 48.8529209, location: 'Paris'})-[:HAS_ORDERED]->(o1) +MERGE (c1)-[:HAS_ORDERED]->(o2) +MERGE (c2:Customer {name:'synyx',longitude: 8.3844571, latitude: 49.0038173, location: 'Karlsruhe'})-[:HAS_ORDERED]->(o3) +MERGE (c2)-[:HAS_ORDERED]->(o4) +MERGE (c3:Customer {name:'Brandenburger Tor',longitude: 13.0951145, latitude: 52.5068042, location: 'Berlin'})-[:HAS_ORDERED]->(o5) +MERGE (c3)-[:HAS_ORDERED]->(o6) +MERGE (c3)-[:HAS_ORDERED]->(o7) +MERGE (c3)-[:HAS_ORDERED]->(o8) \ No newline at end of file