Hi Frans, This does look odd, what is the Virtuoso version being used ? Also you indicate the data is hosted in a remote relational database in which case I assume you are using the Virtuoso commercial release ?
It would be interesting to see the sparql_to_sql_text() output for both queries
to see how they differ, as detailed at:
http://docs.openlinksw.com/virtuoso/fn_sparql_to_sql_text.html
Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc. // http://www.openlinksw.com/
Weblog -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter -- http://twitter.com/OpenLink
Google+ -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers
On 2 Jul 2013, at 09:00, Frans Knibbe | Geodan <[email protected]> wrote:
> Hello,
>
> I think I can share the specifics with the list. Here are two queries that
> can be executed on http://lod.geodan.nl/sparql:
>
> Query A:
> select ?obs
> from <http://lod.geodan.nl/cbs/gwb/>
> where {
> ?obs rdf:type <http://purl.org/linked-data/cube#Observation> .
> ?gem rdfs:label "Amersfoort" .
> ?obs <http://lod.geodan.nl/cbs/gwb/area> ?gem .
> }
>
> Query B:
> select ?obs
> from <http://lod.geodan.nl/cbs/gwb/>
> where {
> ?gem rdfs:label "Amersfoort" .
> ?obs rdf:type <http://purl.org/linked-data/cube#Observation> .
> ?obs <http://lod.geodan.nl/cbs/gwb/area> ?gem .
> }
>
> The difference is that in query B the first two triples in the WHERE clause
> are switched. Query A returns one result, query B returns two. I expect two
> results.
>
> I think I should also note that the data source is a table in a remote RDBMS.
> I can imagine that the effect would not occur if the data were stored in a
> local table.
>
> Regards,
> Frans
>
> On 1-7-2013 22:06, Todd DeLuca wrote:
>> Hi Frans,
>>
>> I am fairly new to SPARQL too. I would be curious to see what triple
>> patterns you used to get these two different results.
>>
>> Best,
>> Todd
>>
>>
>>
>> On Mon, Jul 1, 2013 at 3:55 PM, Frans Knibbe | Geodan
>> <[email protected]> wrote:
>> Hello,
>>
>> I am a beginner with SPARQL. I have always been under the impression
>> that the order of triple patterns in the WHERE clause of a SPARQL SELECT
>> query does not matter. But now I got an unexpected result from a SPARQL
>> query issued to my Virtuoso 6 endpoint. The query contains three triple
>> patterns in the WHERE clause. I expected a solution of two triples, but
>> I only got one. But after switching two triples I did get the expected
>> result. So changing the order changes the result.
>>
>> Does this indicate a problem? Or do I have to get used to the idea that
>> the order of the triple patterns in the WHERE clause does matter?
>>
>> Thanks,
>> Frans
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Windows:
>>
>> Build for Windows Store.
>>
>> http://p.sf.net/sfu/windows-dev2dev
>> _______________________________________________
>> Virtuoso-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>>
>>
>>
>> --
>> Todd DeLuca
>> Scientific Programmer
>> Wall Lab, CBMI, Harvard Medical School
>> http://todddeluca.com
>> http://wall.hms.harvard.edu/
>>
>
>
> --
> --------------------------------------
> Geodan
> President Kennedylaan 1
> 1079 MB Amsterdam (NL)
>
> T +31 (0)20 - 5711 347
> E [email protected]
> www.geodan.nl | disclaimer
> --------------------------------------
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev_______________________________________________
> Virtuoso-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev
_______________________________________________ Virtuoso-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/virtuoso-users
