Rita,
Martin’s response in the e-mail thread you pointed out is as follows:
> Hi Martin,
>
> can you give me an example in pseudo? what is a common swrl query
> that cant be done by sparql?
Assume the following structure:
Class A
Class B subclassof A
Individual z type B
SPARQL: ?i rdf:type A returns nothing
SQWRL: A(?i) => sqwrl:select(?i) return z
That is because SPARQL works only on the literal RDF representation
and doesn't do any inference.
Martin’s statement is not about an ability to express a rule in SPIN versus SWRL, but rather about an ability to use SPARQL to get the desired results from the example query. The rule that helps to produce the desired result is equally simple in either SPARQL or SWRL. It says that if :i a :B and :B rdfs:subClassOf :A, then :i a :A. This is one of the rules implementing RDFS inferencing.
But, in any case, Martin’s statement is incorrect. You can test this out yourself. Simply run a SPARQL query with currently configured inferences. There is a special icon in the SPARQL view of TBC (next to Execute SPARQL icon).
The method of achieving these results with SPIN is pretty much the same as it is with SQWRL. When executing SQWRL query, first SWRL inference rules are taken into account/executed. This is why running SQWRL requires a rule engine, currently Jess.
If you study SPARQL syntax and SWRL syntax, I believe, you should be able to come up with the CONSTRUCT queries not directly expressible in SWRL. By “not directly” I mean that you will need to add a lot of extra classes to your ontology just to achieve some of the same results in SWRL.
Having said this, in my view, the strongest advantages of SPIN are:
Skills: It is SPARQL, developers will need to know SPARQL to work with the RDF data. Expressing rules in SPARQL means they do not need to learn an additional rule language.
Supported platforms: It is SPARQL, all RDF databases support SPARQL natively. Expressing rules in SPARQL means that there is no need to add an additional rule engine into the application architecture. It also means that rules can be executed by the database directly, no need to load the data into Jess (or some other rule engine) for execution.
Community: SWRL has some community around it because it used to be on a standards track and there was no other standard compliant alternative for rules in RDF. SWRL is no longer on a standard track. With this, its use will continue to diminish over time. SPARQL, on the other hand, has a strong and growing community of users.
Regards,
Irene
--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid
Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
topbrai...@googlegroups.com
To unsubscribe from this group, send email to
topbraid-user...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
Hi everyone,
for my thesis I compare different technologies to realize constraint checking for ontologies.
I am currently interested between the difference between SPARQL and SWRL/SQWRL.
In the FAQ (http://spinrdf.org/faq.html) it is said that " SPIN is more expressive than SWRL, because SPARQL has various features such as UNIONs and FILTER expressions"
In the Protege Mailinglist, the opposite is affirmed.
(https://mailman.stanford.edu/pipermail/protege-owl/2009-September/012148.html)
"SPARQL can be used to query OWL ontologies if they are serialized as RDF triples but has no understanding of the semantics associated with those triples."
Martin O'Connor gives an example that can be expressed in SQWRL but not in SPARQL.
The false statement that SPARQL cannot be used with OWL semantics is being repeated again and again, and is often stated to defend the need for SWRL
The second argument of M. Connor was, that SPARQL has no sound semantics [2].
"What's worse, SPARQL does not even have formally sound semantics
in terms of RDF. [..] there
are no guarantees about the soundness of results returned by a SPARQL
query even on an RDF ontology."
I there a de facto standard for the SPARQL semantics, used by each reasoners?
Or do you just trust in the reasoners you choosed?