Skip to content

Commit

Permalink
add files to create example data in the neo4j database using cypher
Browse files Browse the repository at this point in the history
  • Loading branch information
J1e9n9n1y authored Oct 16, 2023
1 parent 9611e8d commit 81d6bcc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions example data/NodeCreation.cypher
Original file line number Diff line number Diff line change
@@ -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})
9 changes: 9 additions & 0 deletions example data/RelationshipCreation.cypher
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 81d6bcc

Please sign in to comment.