[Mulgara-general] Hierarchical queries
Paul Gearon
gearon at ieee.org
Thu Aug 26 00:45:32 UTC 2010
Hi Lars,
On Wed, Aug 25, 2010 at 2:34 PM, Lars Marius Garshol
<larsga at garshol.priv.no> wrote:
>
> I have a foo:contains property which is transitive, and would like to do a single SPARQL query that retrieves the transitive closure along this property. I naively tried making the property an instance of owl:TransitiveProperty, but quickly found that this had no effect.
Yes, that would require automatic entailment. I've avoided that due to
the implicit costs, but I've been considering it recently,
particularly in light of the SPARQL 1.1 Entailment document. All the
same, it's not in there right now.
> I found this
>
> http://docs.mulgara.org/tutorial/krule.html
>
> but it's not clear whether Krule
>
> (a) is powerful enough to express this type of rule, and
Yes it is, and it works fine. However, you need to explicitly run the
rules before issuing your query.
> (b) is the right way to do what I'm trying to do.
>
> Thoughts?
For simple transitive closure there are better ways.
Mulgara's original query language (TQL) includes transitive closure in
it, specifically for this kind of use:
http://docs.mulgara.org/itqlcommands/select.html
SPARQL 1.1 includes transitive closure as well.... only I haven't
implemented this yet. I've start on it (along with a lot of other
SPARQL 1.1 features), but I still have a long way to go before it will
be released. So to use this feature you're stuck with rules or TQL.
Regards,
Paul Gearon
More information about the Mulgara-general
mailing list