[redland-dev] Model aggregation

Carlos Guerreiro carlos.guerreiro at nokia.com
Tue Apr 1 13:44:02 BST 2003


Hi Dave,

Thanks for the detailed explanation.

> So the plan was to use the model.add_submodel method to allow
> construction of the above.  The tricky thing was to implement all the
> APIs, do the data merging and consider the update problem - where do
> stored triples go in the aggregated model?  The first sub-model that
> can take them?

I took a quick glance at the source code for librdf. I got the
impression that implementing the graph navigation APIs could be done in
a relatively straightforward way by implementing a stream that would
aggregate several streams and an iterator that would aggregate several
iterators, that would still leave out a few other APIs that return
individual items or boolean values but overall each individual method
should be fairly simple to implement. Of course there's many of them so
the effort quickly adds up. Am I missing some fundamental difficulty?

Regarding the data merging, since duplicate statements are not
eliminated even in the simple model case, aggregating results should
amount to simple concatenation, no?

The update problem looks quite tricky. Adding statements to the first
sub-model that can take them might be a useful solution in some cases
and I suppose there are other options (e.g.: provide a selection
function to the aggregate model) but I feel it would still be very
useful to have read-only aggregate models where the application would
directly update the appropriate sub-model.

> 
> The Jena design (started at around the same time) has a similar set
> of features
> 
> Dave

Yes, and so does Mozilla's RDFDataSource with additional truth values
for "negative" statements.

Best regards,
Carlos




More information about the redland-dev mailing list