[foaf-dev] RDF/SPARQL in Sqlite/.js again

Toby Inkster tai at g5n.co.uk
Mon Jun 14 16:32:40 CEST 2010

On Mon, 14 Jun 2010 11:07:10 +0200
Dan Brickley <danbri at danbri.org> wrote:

> Question: is ARC's table layout a good thing to try to port over to
> Sqlite? I began that (via http://sqlfairy.sourceforge.net/) but only
> managed to get the schema converted automatically, not the instance
> data. If we stick to essentially the same layout, I have naive hope
> that it might be possible for some poor soul to slog through and
> convert ARC's PHP code into Javascript.

Last time I checked, ARC used quite a few MySQLisms which might make
porting it to another database tricky. If I'm overestimating the
difficulty (and that's quite possible) it would be nice if some patches
could filter back to ARC to make it more database-independent.

Another possibility you might wish to consider though is porting
some of Greg William's RDF::Query/RDF::Trine work from Perl to
Javascript. It already runs on SQLite amongst other databases.

The one drawback you might find though is its layered approach. The
query engine runs on top of an RDF::Trine::Model, which runs on top of
an RDF::Trine::Store, some of which sits on top of database libraries
(though there are other stores like in-memory ones). It's a good
architecture, but might be a lot of code to port. ARC's technique of
rewriting SPARQL to MySQL might be quicker to get started with.

Toby A Inkster
<mailto:mail at tobyinkster.co.uk>

More information about the foaf-dev mailing list