Dear All,
I have been looking around here but I could not find an answer to my question. I am trying to define some basic inference on my triple store and i see that one easy way to do it is to use CONSTRUCT. However I was wondering, in order to avoid confusion, what is the difference between INSERT and CONSTRUCT. It is easy to infer that INSERT inserts new triples in the triple store, but i do not know if the result of the construct query should be also made persistent in the triple store or not.
Regards.
EDIT
Thank you Rob for the quick reply.
So i am wondering in which scenarios can be used the inference defined by the CONSTRUCT statement. I am considering a scenario where a user submits a query like:
SELECT ?a
WHERE {?a rdf:type Assigment.}
and the following triples:
Project rdfs:subClassOf Assigment
JavaProject rdfs:subClassOf Project
proj1 rdf:type Assigment
proj2 rdf:type Project
proj3 rdf:type JavaProject
in case no inference is in place I should get only
a={proj1}
, in case semantics of rdfs:subClassOf
is interpreted i will have a={proj1, proj2, proj3}
.
What I am wondering is that in this case the CONSTRUCT can not help, unless I embed it in the query the user submits. So I should write something like :
SELECT ?a
WHERE {?a rdf:type Assigment.
{
CONSTRUCT {?x rdfs:subClassOf ?z}
WHERE {
?x rdfs:subClassOf ?y.
?y rdfs:subClassOf ?z.
}
}
{
CONSTRUCT {?i rdf:type ?j}
WHERE {
?i rdf:type ?k.
?k rdfs:subClassOf ?j.
}
}
}
which is SPARQL 1.1. So in this case is the person submitting the query that is defining the semantic of subClassOf. In case the admin of the system was to infer the triples I should use INSERT which still is SPARQL 1.1 or SPARUL. So concluding in SPARQL 1.0 I can not define persistent inference queries. Am I right?
Thank you