I have synthetic data generated using Lehigh University Benchmark (LUBM)
data generator (version 1.7), this generates about 402 .owl file including
the schema. I sorted and distributed the triples based on the predicate to
4 different servers.All of these servers run Virtuoso. I also have another
server that holds the entire data set. When I run the following query on
the server that holds the entire data, 59 triples are returned. This query
is query number 2 of the test queries provided with the LU benchmark.

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ub: <http://cs.uga.edu#>
SELECT ?X, ?Y, ?Z
FROM <http://www.cs.uga.edu#>
WHERE
{
    ?X rdf:type ub:GraduateStudent .
    ?Y rdf:type ub:University .
    ?Z rdf:type ub:Department .
    ?X ub:memberOf ?Z .
    ?Z ub:subOrganizationOf ?Y .
    ?X ub:undergraduateDegreeFrom ?Y
}

I wrote a federated version of this query based on my triple distribution
and ran in on the distributed version.However only 1 triple is returned. I
grabbed few of the triples returned from the single server version and
checked if data needed for these triple to be returned exist on the
distributed version of the data and it does, however it is not returned as
a result. The federated query is the following:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ub: <http://cs.uga.edu#>
SELECT *
WHERE
{
    SERVICE <http://IPADD/sparql>{
    ?X rdf:type ub:GraduateStudent .
    ?Y rdf:type ub:University .
    ?Z rdf:type ub:Department .
    ?X ub:undergraduateDegreeFrom ?Y
}
    SERVICE <http://IPADD/sparql>{
        ?X ub:memberOf ?Z .
    }
    ?Z ub:subOrganizationOf ?Y .
}


Also, if I move the last triple pattern on the federated query ?Z
ub:subOrganizationOf ?Y . up to I get the following error: Virtuoso RDFZZ
Error DB.DBA.SPARQL_REXEC('IPADD/sparql', ...) has received result with
unexpected variable name 'stubvar15' My understanding of the federated
query is that it gets all the triples returned by triple patterns in the
query and by service clauses in the query and joins them if possible,
therefore moving a triple pattern up or down should not affect the result
of the query. Am I missing anything here?

--
Kind Regards,
~A
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to