News for hackers. Stuff that matters.
Re:SPARQL Protocol for RDF by dragonwriter on Wednesday June 21, 2017 @01:16AM (#14600841)
> But the OP is correct in their broader point that RDF is rarely a good choice and SPARQL is a pretty horrible solution for querying it.

SPARQL is an excellent choice for querying RDF data (SQL is usable but awkward for querying EAV structured data).

> Note that the reply someone is about to write ("But RDF is a generalized self descriptive data model") means it is intended to solve the exact problem that a RDBMS+SQL solves.

RDF/EAV is more graph than relational structured. It doesn't solve the exact same problem.

Re:SPARQL Protocol for RDF by nl on Wednesday June 21, 2017 @08:25AM (#14603090)
SPARQL is an excellent choice for querying RDF data

It's really not!

There's a reason why Tinkerpop is what most graph databases standardize on, and why things like Neo4J, DGraph, Caley, TitanDB etc (ie, all the graph DBs which people use when they want to build something and not "do the semantic web") don't use SPARQL.

Re:SPARQL Protocol for RDF by dragonwriter on Wednesday June 21, 2017 @10:59AM (#14604334)
> There's a reason why Tinkerpop is what most graph databases standardize on

Tinkerpop is a Java API, not an independent query language, and RDF data (while it is a way of modeling a graph) is not the model of most graph databases (it's a lower-level model than most graph databases expose, and is about as far from them as it is from the table model of SQL databases.)

An optimal Java API for graph databases with a more typical model is not an optimal query language for RDF data, for pretty much the same reason SQL isn't.

Now, what you describe is probably a sign may that RDF isn't the right exposed data model for many use cases (EAV-style representations are often used for deep internals, but there's probably a reason that outside of RDF most systems which use the model internally expose something more similar to the conventional relational or graph model to application developers), not that SPARQL isn't the right language for querying RDF data.

Re:SPARQL Protocol for RDF by nl on Wednesday June 21, 2017 @01:19PM (#14605847)
Yes, Tinkerpop is a Java API which is unfortunate. But the Tinkerpop set of technologies isn't Java specific. There are Python and Javascript version of Gremlin (the rough equivalent of SPARQL).

Gremlin is very widely supported across graph databases.

what you describe is probably a sign may that RDF isn't the right exposed data model for many use cases

Well. that's exactly what my claim is, so that's good!

not that SPARQL isn't the right language for querying RDF data.

Have you ever tried one of the alternatives? Try GraphQL on DGraph (Or Gizmo/Gremlin on Cayley) against a Freebase or DBPedia import. That's exactly the equivalent of SPARQL against RDF, and it's so much better.

Re:SPARQL Protocol for RDF by hipsters_unite on Wednesday June 21, 2017 @06:45AM (#14602574)
> RDF/EAV is more graph than relational structured. It doesn't solve the exact same problem.

Yeah 100% this. Comparing a graph data model and a relational data model while obviously possible isn't really all that fruitful so long as each is being use to solve the problem that they're the best fit for.

Re:SPARQL Protocol for RDF by nl on Wednesday June 21, 2017 @08:41AM (#14603201)
Two points:

Firstly: RDF is an inadequate expression of most graphs, and SPARQL is a bad way to query graphs. See my comment here on this: https://news.ycombinator.com/item?id=14603090

Secondly: graphs storage is something which is very tempting in theory but very hard to get right in practice. I'm not going to say it is never appropriate (that is clearly untrue), but for most production applications it isn't the right choice.

I'd note for example that most social applications use a RDMS to store a single layer of friends (and then perhaps have a second graph DB for batch/stream processing of graph functions).