[redland-dev] querying using ruby+sparql
Dave Beckett
Dave.Beckett at bristol.ac.uk
Tue Aug 30 21:26:02 BST 2005
On Tue, 2005-08-30 at 10:42 +0100, Eyal Oren wrote:
> Hi,
>
> I've got two questions:
>
> I'm using the cvs version of redland and ruby-bindings. When I'm querying
> (SPARQL) using roqet or ruby-bindings the 'distinct' keyword seems to be
> ignored. When I'm querying on librdf.org/query 'distinct' seems to
> respected though. Am I noticing this correctly, and is librdf.org/query
> maybe using a newer version of redland?
It's using a CVS version of rasqal which does implement DISTINCT.
> Performance-wise, it is better to query using SPARQL or using the model
> API? I guess this depends on the query, but for example if I just retrieve
> the set of outgoing predicates from a subject? (I wanted to benchmark
> this, but since the 'distinct' doesn't work, the comparison is not really
> fair).
Performance wise there's nothing in it. Using a query language vs API
approach has the usual tradeoffs of power/flexibility. The API doesn't
implement DISTINCT, so you'd have to do it yourself - just one example
where the query language can help you do some things easier. There are
others for both the query and API approaches.
Dave
More information about the redland-dev
mailing list