Created
December 2, 2023 15:30
-
-
Save nikhilakki/66a5409ecfb7a27f01295266dd0b3d55 to your computer and use it in GitHub Desktop.
Seed data for Neo4j blog article on nikhilakki.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create sample Person nodes | |
CREATE (arun:Person {name:"Arun"}) | |
CREATE (nisha:Person {name:"Nisha"}) | |
// Create KNOWS relationships | |
MATCH (arun:Person), (nisha:Person) | |
CREATE (arun)-[:KNOWS]->(nisha) | |
// Add more Person nodes | |
CREATE (neil:Person {name:"Neil"}) | |
CREATE (abhishek:Person {name: "Abhishek"}) | |
CREATE (neil)-[:KNOWS]->(arun) | |
CREATE (abhishek)-[:KNOWS]->(abhishek) | |
// Create Movie nodes and RATED relationships | |
CREATE (user1:User {name:"Rohit"}) | |
CREATE (movie1:Movie {title:"RRR"}) | |
CREATE (movie2:Movie {title:"Kantara"}) | |
CREATE (user1)-[:RATED {rating: 10}]->(movie1) | |
CREATE (user1)-[:RATED {rating: 9}]->(movie2) | |
// Create Article nodes and CLICKED relationships | |
CREATE (article1:Article {title:"Graph Databases in India"}) | |
CREATE (article2:Article {title:"Connecting Indian Businesses"}) | |
CREATE (user1)-[:CLICKED]->(article1) | |
CREATE (user1)-[:CLICKED]->(article2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment