HomePage RecentChanges SPARQL

Diving into the deep end of SPARQL. Learning lots, having fun, but also having issues.

Issues

FROM

A simple query like this:

SELECT ?s ?p ?o
WHERE
{ ?s ?p ?o
} LIMIT 50 OFFSET 0

Won't work on my Virtuoso server, so I use:

SELECT ?s ?p ?o
FROM <http://the/data/URI>
WHERE
{ ?s ?p ?o
} LIMIT 50 OFFSET 0

Yet adding a FROM on the original source gets me no data.

FORMAT

I seem to have lots of problems with format.

What I think is worse, is the Content-type returned is not always right. Sometimes it returns a useful entry like "application/xml+sparql" and other times it returns text/plain. Unfortunately the parser I am using uses the content-type to decide which parser to use, and it is never working unless I hack it.

Connection String

Reinvention...

Why is it that people are inventing new libraries to deal with this data. I am sure the answer is that I don't know what I am talking about... but let me assume my ignorance could be useful. How about a standard DBI (Perl) or similar source for other languages. The nice thing is that these database drivers (DBD in Perl DBI terms) is that they accept strings as their query, so if their query is SPARQL, that doesn't change the interface. But it does give you then a standard interface, including how to retrieve the next value, how to encode strings etc etc.

Bind parameters

How do we use bind parameters. These are the core of inserting unsafe data into a query. It is the normal way you would add any data provided to a query. WHERE x = ?, or even x NOT LIKE ?. There seems to be some work on this in SPARQL 1.1, and some non standard extensions.