Database Reference
In-Depth Information
CREATE (:Artist {Name : 'John G. Avildsen', WorkedAs
: ["Director"]});
CREATE (:Artist {Name : 'Ralph Macchio', WorkedAs :
["Actor"]});
CREATE (:Artist {Name : 'Simon West', WorkedAs :
["Director"]});
5. Execute the following set of cypher queries in your Neo4j shell to create the rela-
tionships between artists and movies:
Match (artist:Artist {Name : "Sylvester Stallone"}),
(movie:Movie {Title: "Rocky"}) CREATE
(artist)-[:ACTED_IN {Role : "Rocky Balboa"}]->(movie);
Match (artist:Artist {Name : "Sylvester Stallone"}),
(movie:Movie {Title: "Rocky II"}) CREATE
(artist)-[:ACTED_IN {Role : "Rocky Balboa"}]->(movie);
Match (artist:Artist {Name : "Sylvester Stallone"}),
(movie:Movie {Title: "Rocky III"}) CREATE
(artist)-[:ACTED_IN {Role : "Rocky Balboa"}]->(movie);
Match (artist:Artist {Name : "Sylvester Stallone"}),
(movie:Movie {Title: "Rocky IV"}) CREATE
(artist)-[:ACTED_IN {Role : "Rocky Balboa"}]->(movie);
Match (artist:Artist {Name : "Sylvester Stallone"}),
(movie:Movie {Title: "Rocky V"}) CREATE
(artist)-[:ACTED_IN {Role : "Rocky Balboa"}]->(movie);
Match (artist:Artist {Name : "Sylvester Stallone"}),
(movie:Movie {Title: "The Expendables"}) CREATE
(artist)-[:ACTED_IN {Role : "Barney Ross"}]->(movie);
Match (artist:Artist {Name : "Sylvester Stallone"}),
(movie:Movie {Title: "The Expendables II"}) CREATE
(artist)-[:ACTED_IN {Role : "Barney Ross"}]->(movie);
Match (artist:Artist {Name : "Sylvester Stallone"}),
(movie:Movie {Title: "Rocky II"}) CREATE
(artist)-[:DIRECTED]->(movie);
Match (artist:Artist {Name : "Sylvester Stallone"}),
(movie:Movie {Title: "Rocky III"}) CREATE
(artist)-[:DIRECTED]->(movie);
Match (artist:Artist {Name : "Sylvester Stallone"}),
(movie:Movie {Title: "Rocky IV"}) CREATE
Search WWH ::




Custom Search