SPARQL support in JRDF now has two ways of performing OPTIONAL which follows the semantics of the specification (at least the queries I've tried).
The first is through the usual natural join, union and antijoin (which is composed of difference and semijon) combination. The second is through natural join and minimum union (which is made of union and tuple subsumption).
I have been playing with other ways of producing the same effect as OPTIONAL. Mainly trying to get away from a non-null rejecting version of join that appears in SPARQL.
The currnet implementation does seem compatible with SPARQL and the Galindo-Legaria approaches even if this is contradicting what was said in "Semantics and Complexity of SPARQL" (section 4.3, page 12). Outer Union, Full and Left Outerjoin as defined by Galindo-Legaria requires some nulls to be let through, as far as I can see. The use of nulls (or in my implementation tuples without all values bound to the headings) is just a way of having relations that contain "sub-results" from things such as outer joins. Another approach would be to return a set of different relations that have tuples which match all of the headings. As mentioned by Galindo-Legaria, you can get these other results by projecting the relevant attributes.
Of course, I can still see there's much more to do and look at it. Now comes the write up of the results (performance and user interface), code polishing and so on.
No comments:
Post a Comment