[Mulgara-dev] Re: Blank nodes in queries (was: Recent commits to Mulgara.)

Life is hard, and then you die ronald at innovation.ch
Sun Oct 15 12:08:32 UTC 2006


On Sat, Oct 07, 2006 at 07:50:13PM +1000, Andrew Newman wrote:
> On 10/7/06, Paul Gearon <gearon at ieee.org> wrote:
> >
> >On Oct 6, 2006, at 9:42 PM, Andrae Muys wrote:
> >> * Pattern-Compliement - the exclude() pattern-type.  To be honest I
> >> don't know why we need this.  When Paul and Andrew were working on
> >> ensuring we could support RDFS/OWL they assured me it was required,
> >> so I made sure I provided it.
> >
> >Just to be clear here... I do NOT see the point in this operation.
> >If I once argued for it, then I believe I was in error.  I do recall
> >arguing with Andrew over the need for it, and my position then was
> >that we do not.
> >
> >My opinion on this may be different if RDF had negation as failure,
> >but I'd have to consider this carefully before committing to that
> >point of view.
> >
> >> * Relational-Difference - the MINUS keyword.  Some of the rules in
> >> RDFS are expressed in terms of excluding certain classes of term,
> >> and the alternatives we faced were either an O(n) filter - or a O
> >> (log n) difference.  Scalability is our top priority, only
> >> correctness is more important to us.  So we added another
> >> relational operator to our query language.
> >
> >This is the required operation rather that the complement mentioned
> >above.
> 
> So I'd thought I'd just briefly de-lurk as my names been mentioned a
> bit and it'd be good if I could conclusively put to rest the EXCLUDE
> operator.  I'm not presenting my own information (as I think I've made
> enough attempts previously) this is Date and Darwen, "Databases, Types
> and the Relational Model, The 3rd Manifesto", 3rd edition pp
> 361,363-364:
> 
> "We include a relational complement operator, <NOT>.  The availability
> of <NOT> allows us to drop the relational difference operation
> (MINUS), since that operator can be expressed in terms of <AND> and
> <NOT>."
[snip]

I'd just like to throw in something from our recent experience. The
fact that 'minus = and not' is simple and clear. The problem we were
having with the exclude() function, and which caused quite some
confusion despite the detailed docs, is that the projection from
triples to tuples is applied _after_ the NOT, not before. I.e. in

  exclude($a <foo:bar> '0')

one naively (or rightly) expects this to result in

  NOT( {$a | $a <foo:bar> '0'} )

instead of the current

  {$a | $a in NOT( {$a <foo:bar> '0'} ) }

It's not at all clear why the current definition was chosen. In fact,
maybe it would be nice to add the unary NOT operator (or function)
that does a NOT on the tuples, not the triples (i.e. applies the
projection first).


  Cheers,

  Ronald




More information about the Mulgara-dev mailing list