Live data from Hacker News

Graph query languages: Cypher vs. Gremlin vs. nGQL

nebula-graph.io

31–40 of 66 posts

Re: Graph query languages: Cypher vs. Gremlin vs. nGQL

#31
post #3

I rather like Cypher, easy to get into with the (node)-[edge]->(node) construction, difficult in the middle (until you realise that WITH is very different to SQL's), then a delight. Gremlin, so they let Java's horrible camelCase leak into their syntax? Oh my ...

camelCase makes sense in golang's "Go Way", as minimizing variable name within its scope is promoted. Then, using underscores makes for more difficult read (words separated). CamelCase names are exported by language semantic.

So it doesn't need to be bad necessarily, if code follows the same conventions.

Re: Graph query languages: Cypher vs. Gremlin vs. nGQL

#32

Sorry, but this article fails big time: no mention at all of SPARQL. For application developers, having access to general public Knowledge Graphs like DBPedia and WikiData can be a very good resource. While I am also a big fan of more general graph databases like Neo4J, not even mentioning SPARQL is such a HUGE OMISSION that I have to suspect some commercially motivated bias in this article. The decision of which gra…

Is there any SPARQL implementation that returns results under 10 seconds on a big dataset? Because, I never found a public SPARQL endpoint that gives remotely acceptable response time.

Of course there are. The SPARQL endpoints open for public access at no cost for the user, and potentially accessed by i-dont-know how many clients concurrently can't be used as benchmarks.

Re: Graph query languages: Cypher vs. Gremlin vs. nGQL

#33
post #19

No mention of Datalog? http://www.learndatalogtoday.org/

Datalog is such a delight to use especially since queries are just data structures are just code. Once the basics clicked I felt empowered to do anything in Datalog, while I feel like I always have to learn or remind myself of more syntax when I want to do anything fancy with SQL.

Re: Graph query languages: Cypher vs. Gremlin vs. nGQL

#34
We evaluated umpteen graph dbs this past year and chose vanilla Postgres instead because Neo4j/RedisGraph have insane licenses.

It’s useful you’re comparing these languages. I would suggest to make yours more like Cypher, specifically the arrows are much less verbose than BIDIRECT/ REVERSELY, and MATCH is a lot less verbose and more powerful than other query languages. It sucks to want to use Neo4j then not be able to due to license and business issues.

If there were a quality graph db with a permissive license and Cypher, serverless hosting, search and JSON, we’d use it... neo4j didn’t work out because they require an NDA to get a price quote (!) and the Redis Source Available License basically reads, “you can’t use this for startups”; RedisLabs.com quotes a “low” price of $500 monthly to get modules with basic stuff like JSON, Search, and Graphs (“cloud pro”) - but then the pricing page triples that number. We pointed this out to redislabs at least 3 different channels (email, git, Twitter) but the pricing error still exists on their cloud page. If RedisLabs leaves an $800 / mo typo sitting on their page for months, how do you trust them with sensitive customer data? Went with Amazon Aurora PostgreSQL instead. Love Row Level Security (but wish you could specify columns inside your row policies)

You might also include ArangoDB AQL

Re: Graph query languages: Cypher vs. Gremlin vs. nGQL

#35
post #16

Sorry, but this article fails big time: no mention at all of SPARQL. For application developers, having access to general public Knowledge Graphs like DBPedia and WikiData can be a very good resource. While I am also a big fan of more general graph databases like Neo4J, not even mentioning SPARQL is such a HUGE OMISSION that I have to suspect some commercially motivated bias in this article. The decision of which gra…

How are DBPedia & WikiData useful for application developers? As a reference or for actual integration into applications?

I use WikiData as a (non-realtime) data source for Swymm.org. I've written a bunch of pretty intense SPARQL queries as such and I agree that it's odd that SPARQL is not mentioned in the post.

Re: Graph query languages: Cypher vs. Gremlin vs. nGQL

#36

Sorry, but this article fails big time: no mention at all of SPARQL. For application developers, having access to general public Knowledge Graphs like DBPedia and WikiData can be a very good resource. While I am also a big fan of more general graph databases like Neo4J, not even mentioning SPARQL is such a HUGE OMISSION that I have to suspect some commercially motivated bias in this article. The decision of which gra…

Is there any SPARQL implementation that returns results under 10 seconds on a big dataset? Because, I never found a public SPARQL endpoint that gives remotely acceptable response time.

I'm not sure exactly what you mean by implementation here, but many (most?) of the Wikidata examples (on its public endpoint) are very fast, i.e.: https://query.wikidata.org/#%23Cats%0ASELECT%20%3Fitem%20%3F...

Re: Graph query languages: Cypher vs. Gremlin vs. nGQL

#37
post #10

Earlier quoted context omitted.

Yes.. I work on several projects that leverage SPARQL. The article is also remiss in not mentioning the work the W3C is doing along with Neo4J to do its own alignment ( https://www.w3.org/Data/events/data-ws-2019/ ). Indeed, this article seems very self serving in its omissions. There is a follow up meeting planned soon for that too. Also, much of the work in validation (SHACL, Shex) of graphs leverages SPARQL so it'…

From your link "W3C's RDF uses URIs (Web addresses) for nodes and link labels in directed graphs. This has the advantage of enabling them to be dereferenced to obtain further information, making for a Web of linked data. In particular, nodes can be dereferenced to graphs on remote databases." I think spreading those kind of lies[1] if a part of why there is a divide between the W3C (at least the RDF community) and th…

Yes, thank you! That's one of my biggest gripes with the W3C stack. How am I supposed to build semantic data, if I can't access the semantics and/or they can change or disappear at any time?

That has been one of the main motivations why I've been working on a content-addressed semantic data/ontology format[0] with a modern decentrelized stack in mind.

[0] https://github.com/rlay-project/rlay-ontology

Re: Graph query languages: Cypher vs. Gremlin vs. nGQL

#40
post #18

Earlier quoted context omitted.

I was really attracted to graph databases mainly for the ability to do joins in effectively constant time rather than O(log N) time. But then I realized that sharding and localizing data can accomplish roughly the same thing. Also the graph database doesn’t have to duplicate data so much for joins, saving on memory. If you are going to have a huge dataset, build your data as RDMBS first and then make a cache in a gra…

I came to exactly the same conclusion after having Neo4j pushed on a project by managers who'd been sold by their "it's great for everything!" marketing. At least as of ~2 years ago, no, it wasn't. Fine for a narrow set of query types for data of a very specific kind of shape (dense graph) that you don't care about much and can re-generate if it gets screwed up. Unsuitable as a "database of record" (poor integrity en…

Spot on with my experiences. I had a great honeymoon period with Cypher via Neo4j but then the cracks quickly started to show.

It was a valuable learning experience but I find myself moving back toward SQLy and JSONy things for production models.

Post reply on HN