Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I query transitive closures / trees / hierarchies / RDF lists in SPARQL?

0
10 Posted

How can I query transitive closures / trees / hierarchies / RDF lists in SPARQL?

0

There is no built-in support within SPARQL to query hierarchical structures of an unknown depth (e.g. trees or lists), to query transitive relations, or to query via XPath like paths. The Data Access Working Group postponed this issue in early 2005. There are several workarounds to perform these queries using SPARQL: • Repeated queries. A repeating structure can be queried via a series of queries. If the structure’s internal nodes have URIs (or if the SPARQL endpoint supports blank node identifiers which are stable across queries (“told bnodes”), then the same query can be issued repeatedly to explore the structure. Alternatively, an ever-growing query can be created which repeatedly queries the structure from its root to an increasing, fixed depth (until a desired value is found or the end of the structure is reached). • Inference. In an environment which supports querying over an inferred graph, inference rules can be used to specify transitive closures or hierarchy membership relati

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.