2011/11/4 maxdemarzi <maxdema...@gmail.com>

> I think the reason we're even having this discussion is because the cypher
> syntax is close, but not quite SQL in the first place.  This makes the
> differences between the two languages stick out in my mind.
>
> I haven't had a lot of time on cypher, but as a newbie to the language I
> see
> a cypher query and I'm always thinking, RETURN = SELECT, START = FROM,
> PATTERN = JOIN.  So I'm doing the translation in my head back to SQL
> anyway.
>
> Let's just make it as SQLish as possible to get rid of that annoying
> internal translation.
>
> Cypher
> -=-=-=-=-
> START lucy = node(1000)
> MATCH lucy-[:ACTS_IN]->movie<-[:ACTS_IN]-co_actor
> WHERE not(movie.title = "Water World")
> RETURN movie.title, count(*)
> ORDER BY count(*) DESC
>
> PQL
> -=-=-
> SELECT movie.title, count(*)
> FROM node(1000) as lucy
> JOIN lucy-[:ACTS_IN]->movie<-[:ACTS_IN]-co_actor
> WHERE movie.title <> "Water World"
> ORDER BY count(*) DESC
>
> I like JOIN instead of MATCH.  Match is "The description of the pattern is
> made up of one or more paths, separated by commas." which closely resembles
> JOIN in SQL which is about describing the Relationships between tables...
> and once again I'm doing the translation in my head anyway, might as well
> eliminate that mental waste.
>
> Lastly, I'm not sure about the syntax for describing relationships.
>
> --> and <-- or --- with ?: makes me think chicken scratch not language.
> Using INCOMING, OUTGOING, OPTIONAL, AS, etc might make the query verbose,
> but maybe more readable?
>
>
I'd say the strongest part of Cypher is the "ascii art" pattern where you
clearly see what you're querying for, right there and then without having
to parse it into a graph into your head. Removing that would reduce my
interest in this language significantly.


> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Cypher-Pickle-tp3480817p3481094.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to