generalize mapping from SPARQL to SQL

I've been tinkering with what I think is a complete mapping to SQL for
SPARQL graph patterns (expressions and XPath functions are a bit
easier, I expect). I paid special attention to when you know if a
variable is bound (the algorithm keeps a list of reasons something may
not be bound in utters them as constraints like
   (G_union1._DISJOINT_!=1 OR (G_union1.who=R_who.empid AND
			       R_who.birthday=G_union1.bday))

I've attached the test program (all of which pass) and the meat of the
code (RDB2RDFMain.scala). It's written in functional scala. The test
include an RDF representation of the database which is meant to be
most friendly to linked data. Richard, I'd like your feedback on that
as I've seen you do some elegant architecture in the area.

In general, go ahead an throw rocks; I want to see if you guys find
stuff that I've missed in the graph pattern mapping. The code itself
will be free with an MIT license as soon as I can figure out whether
to use git or mercurial or cvs or subversion or cat or ... Then I'll
put it on some server somewhere and give a pointer.
-- 
-ericP

Received on Friday, 8 January 2010 06:28:09 UTC