W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2005

Streaming version of CONSTRUCT

From: Bob MacGregor <bmacgregor@siderean.com>
Date: Sun, 20 Feb 2005 15:12:56 -0800
Message-ID: <42191978.7010304@siderean.com>
To: public-rdf-dawg@w3.org
We have an application that is based around, among other things, efficient
retrieval of tree-shaped RDF graphs.  We tried programming this using
SELECT combined with OPTIONAL clauses, but the resultant cartesian
products made that  approach completely infeasible for large datasets.

Our solution was to return an iterator that generates a tree-shaped graph
at each iteration.  The closest notion to this in SPARQL is the
CONSTRUCT clause -- using SPARQL, we could specify a tree-shaped template,
and return back a graph containing our trees.  However, this would
also have very bad performance, because in our applications, there
may be 10,000 trees, but we only want to see the first few (10-20).
And then maybe a few more.

The problem with CONSTRUCT as currently defined is that it
only returns a single graph.  If it were redefined to return a
stream of graphs (one per template), then we could get exactly the 
efficiency we are
looking for.

Also, it would be nice if LIMIT were defined to apply to CONSTRUCT
as well as select.  Syntactially, it appears to be legal, but the spec 
not to define what it does.   In this case, LIMIT should specify a bound 
on how
many times the template can be instantiated. 

Cheers, Bob

Bob MacGregor
Chief Scientist

	Siderean Software Inc
390 North Sepulveda Blvd., Suite 2070
El Segundo, CA 90245
bmacgregor@siderean.com <mailto:bmacgregor@siderean.com> 	
tel: 	+1-310 647-4266
fax: 	+1-310-647-3470




Received on Sunday, 20 February 2005 23:14:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:00:46 UTC