Solution: Adding multiple relationships

…And we're back with the solution.…So I'm going to relay the solution that is probably the way that you've written it.…First of all, you would have matched the…person with the relationship, acted in a movie.…And then found other people who've also acted in the movie.…In this case, we haven't actually given a variable to the…movie, we've just given variables to the people, a and b.…Now, I've created the relationship a knows b.…

This in itself could introduce a problem.…And that is, that it could try to make multiple relationships,…if the same people appeared in more than one movie together.…For that purpose, the correct solution should include the word unique.…Let's try running this now.…Start with the MATCH command, and we need to…find our person a, and this is an easy one, the…relationship ACTED_IN and the empty node.…

And then the reciprocal, and in this case it is b of a person node.…This finds the people who acted in the movies together, and now CREATE UNIQUE.…A KNOWS b.…Now one thing that's very subtle that may have missed your eyes is that I…

Resume Transcript Auto-Scroll

Author

Released

5/29/2014

Why are people abandoning their RDMS databases and switching to graph databases like Neo4j? It's more than a "big data" trend. Graph databases can handle more complex data and relationships, which are baked in at the record level. Take a trip through the nuances of the most popular graph database, Neo4j, with Duane Nickull and find out if it's right for your data. He covers key concepts, like transitions, searches, and traversals, and shows you how to work with nodes, the relationships between nodes, and navigate large graphs of information. Developers will be interested in the chapters devoted to Cypher, the query language for finding, creating, modifying, and deleting Neo4J data. There are ten coding challenges sprinkled throughout the course, allowing you to test your Cypher skills, and the exercise files feature a fun, interactive mini "IMDB" that explores data from your favorite movies.