Live data from Hacker News

Querying an RDF triplestore using SPARQL and Relational pipes

relational-pipes.globalcode.info

11–15 of 15 posts

Re: Querying an RDF triplestore using SPARQL and Relational pipes

#11
post #5
post #2

I was wondering if there’re use cases for this in the real world where relational database doesn’t cut it?

Most of my academic and current research career involves RDF and SPARQL and I wish it were a bit more used outside of academia or esoteric library / information science related fields. Currently taking a bunch of heterogenous data from different providers, most of which is in some kind of relational database, then transforming it into RDF and letting it be queryable using sparql. The creation of aggregated entities b…

RDF* or Edge Properties fixes this definitively and it's spread to most RDF systems. See http://stardog.com/docs/ for example.

Re: Querying an RDF triplestore using SPARQL and Relational pipes

#12
post #2

I was wondering if there’re use cases for this in the real world where relational database doesn’t cut it?

Potentially, if there is a need for the description logic supported by OWL. Some of the logic would be pushed from the application into the data layer, e.g. as a replacement for something like Prolog in the app. If you're dealing with a database and not a "knowledge base" of facts, then it's probably not for you. If you need a graph database, consider regular graph databases instead.

I have never seen a case where a triple store was used because it was necessary to achieve an outcome. It was always part of the premise, to show that a certain task can be achieved using triple stores. The "semantic" label is also problematic, some people think that "semantic" technology is magic and will somehow help them solve their problems.

My experience with semantic technology is from University and a commercial project. An architect who didn't talk to the engineering team decided that "semantic" technology should be used. The project was a catastrophe, we spent most of the time trying to get the technology to work for the simplest things. The situation improved when we started working around the semantic stuff, using a relational DB internally allowed us to improve performance by a few orders of magnitude.

Because all data is stored as triples of subject, predicate and object, the indexing options for improving query performance are limited compared to relational databases. While it's possible to change the graph structure to speed things up, the structure is usually chosen for semantics and defined in an ontology. A change in the structure is also a change of the semantics of the graph.

Given an undocumented triple store, it's quite difficult to figure out the graph structure stored inside. In a relational database you can just run the equivalent of "SHOW TABLES" and go from there. In the semantic world, you need a manual for the ontologies used. It's sad because the whole point of "semantic" technology was to attach meaning to data.

Triple stores also receive way less attention than databases like Postgres or MariaDB and I'd rather use something proven in production scenarios.

Re: Querying an RDF triplestore using SPARQL and Relational pipes

#13
post #2

I was wondering if there’re use cases for this in the real world where relational database doesn’t cut it?

RDF, SPARQL and Linked Data are standards for interchange. They don't care about the underlying technology, you could definitely expose a relational SQL database using a Linked Data endpoint.

Re: Querying an RDF triplestore using SPARQL and Relational pipes

#14
post #2

I was wondering if there’re use cases for this in the real world where relational database doesn’t cut it?

I work in the energy space. A relatively common format for information exchange is the Common Information Model ("CIM")[1] which is usually serialized as RDF XML documents. In Europe, this format is used as the standard data model for transmission system operators (TSOs) to share network information needed to run the Europe wide electrical grid. ENTSO-E [2] publishes a set of RDFS profiles that more tightly scope the…

> This can be represented in a relational database, but a lot of the queries start to become recursive.

Recursive queries are natively supported in SQL, via Common Table Expression (CTE's). It's not like a triplestore is doing anything different underneath.

Re: Querying an RDF triplestore using SPARQL and Relational pipes

#15
post #9

Wikidata has a great SPARQL editor with plenty of examples and built in visualizations: https://query.wikidata.org/

My experience is that it's a opaque query tool and the wikidata editing process does nothing to make it easier. Maybe if you know the ins and outs of your data and at least a basic understanding of the query language.
Post reply on HN