The idea of having (actor:Person)-[:ACTED_IN]->(movie:Movie)-[:PLAYED_IN]->(theatre:Venue) makes sense to me. However, I do not see why you would want the actor connected to the theatre if one of his movies played there. The fact that his movie played there sounds like a result of a query, not part of the data structure. If you ask:
MATCH (actor:Person)-[:ACTED_IN]->(movie:Movie)-[:PLAYED_IN]->(theatre:Venue) WHERE actor.name = 'Emil' AND theatre.name = 'The Best Shows' RETURN actor.name, count(movie), theatre.name The fact that this actor has movies that showed in that theater is a result of the query. If you decide to add a relationship between the actor and the theatre, you are storing the same information in two ways, and risking getting out of sync. The fact that he has movies in the theatre is already in the graph. Adding it again only makes sense if for some reason the original query was very slow, and you wanted to cache the results as additional structure for performance reasons. But in this case there would be no performance reasons. The query will be almost the same speed. On Tue, Sep 9, 2014 at 5:05 PM, Mohana Krishna <[email protected]> wrote: > Suppose there is a node of 3rd type (label): Theater . A node of type > theater is connected to a node of type person "if at least one of his > movies had been played in the theater" . Similarly, a node of type theater > is connected to a node of type movie "if the movie had been played in the > theater". In this case how can I find the instances (size-3 cliques) where > a size-3 triplet will have (theaterX, movieY, personZ) such that all of > them are connected to one another. I hope your explanation in this case > would help me better as the movies database had only two "labels" > > On Tuesday, 12 August 2014 20:00:01 UTC+5:30, Mohana Krishna wrote: > >> Hello, >> >> I have loaded the spatial data in the attached file using REST API script >> (which is also attached). The nodes are created and I can visualize them on >> DB. >> >> However when I perform the query >> >> "START n=node:geom('withinDistance:[41.8082, -87.7084, 10.0]') RETURN n" >> in CYPHER window , I am getting "Unknown Error" as result. >> >> Please help. >> > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
