Egon --

On Jan 14, 2009, at 11:26 AM, Egon Willighagen wrote:

> On 1/14/09, Ted Thibodeau Jr <[email protected]> wrote:
>> Without seeing your query, I can't be sure,
>
> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
>
> select distinct ?c where {?c rdf:type dbpedia-owl:ChemicalCompound}

I note that there was no ordering in that query -- which means
that you may see *any* first and last value in your result set --
rows are returned in arbitrary order, and this may change between
executions of the query.


> Should not be overly many hits...

That's easy to check with one of Virtuoso's aggregate extensions
to SPARQL --

    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
    SELECT COUNT (DISTINCT ?c)
       WHERE {?c rdf:type dbpedia-owl:ChemicalCompound}

-- which gets --

callret-0
    4379



> The SPARQL end point now returns
>
> http://dbpedia.org/resource/%28Benzylideneacetone%29iron_tricarbonyl
> ...
> http://dbpedia.org/resource/Congo_red



When I add an ordering clause to the query --

    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
    SELECT DISTINCT ?c
       WHERE {?c rdf:type dbpedia-owl:ChemicalCompound}
       ORDER BY ?c

-- the range returned is --

    
<http://dbpedia.org/resource/%281S%29-1-Methyl-2%2C3%2C4%2C9-tetrahydro-1H-pyrido-3%2C4-b-indole
 
 >
    ...
    <http://dbpedia.org/resource/Calcium_oxide>


I hope this clarifies things.

Be seeing you,

Ted




-- 
A: Yes.                      http://www.guckes.net/faq/attribution.html
| Q: Are you sure?
| | A: Because it reverses the logical flow of conversation.
| | | Q: Why is top posting frowned upon?

Ted Thibodeau, Jr.           //               voice +1-781-273-0900 x32
Evangelism & Support         //        mailto:[email protected]
OpenLink Software, Inc.      //              http://www.openlinksw.com/
                                  http://www.openlinksw.com/weblogs/uda/
OpenLink Blogs              http://www.openlinksw.com/weblogs/virtuoso/
                                http://www.openlinksw.com/blog/~kidehen/
     Universal Data Access and Virtual Database Technology Providers




------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to