News for hackers. Stuff that matters.
Re:Introducing OpenCypher, the open graph query language pro... by dmoreno on Thursday October 22, 2015 @05:41PM (#10435305)
Why is similar to SQL but different, wouldn't be better to add the MATCH parameter to SELECT on good old SQL?

From https://en.wikipedia.org/wiki/Cypher_Query_Language:

    MATCH (charlie:Person { name:'Charlie Sheen' })-[:ACTED_IN]-(movie:Movie)
    RETURN movie
to

  SELECT movie
  FROM Movie movie, Person person
  WHERE person.name = 'Charlie Sheen'
  MATCH person-[:ACTED_IN]->movie;
Re:Introducing OpenCypher, the open graph query language pro... by jakewins on Thursday October 22, 2015 @06:25PM (#10435558)
While Cypher borrows a lot of (good) ideas from SQL, the two languages are fundamentally different in their underlying model. SQL deals with Relational Algebra, while Cypher deals with Graph Theory.

For that pattern to work in SQL, your SQL engine would need to be able to view its relations (tables) as a graph. I'm not smart enough to sort this out in my head, but my instinct tells me that it's better to have the two models separate, mixing them in one query seems like a recipe for confusion.

Re:Introducing OpenCypher, the open graph query language pro... by okram on Thursday October 22, 2015 @06:57PM (#10435720)
This is an exact replica in Gremlin3:

  g.V().has("name","Charlie Sheen").
    as("person").out("actedIn").as("movie").
      select("movie")
However, this can be expressed in a much simpler form as you don't need all the variables. Simply do:

  g.V().has("name","Charlie Sheen").out("actedIn")
Re:Introducing OpenCypher, the open graph query language pro... by cheerfulstoic on Thursday October 22, 2015 @09:43PM (#10436342)
Sometimes you do need the labels, depending on what you're trying to query for. If, for example, a person could have acted in both plays and movies, sometimes you might want one or the other specifically.