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

 

 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Rita Marnau
Sent: Wednesday, June 02, 2010 12:21 PM
To: [email protected]
Subject: [topbraid-users] SPARQL vs SQWRL

 

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.ht
ml)
"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.

Now, I am lost. Is there a good reference for the comparison between
SPARQL/SWRL/SQWRL ?
Have you an example for the statement, that SPARQL is more expressive than
SWRL ? 

Thanks a lot. 

Rita 

-- 
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
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

-- 
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
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to