- From: Eric Prud'hommeaux <eric@w3.org>
- Date: Wed, 19 Jan 2005 00:00:14 -0500
- To: RDF Data Access Working Group <public-rdf-dawg@w3.org>
- Message-ID: <20050119050013.GA10086@w3.org>
On Thu, Dec 23, 2004 at 10:15:24AM +0000, Steve Harris wrote: > > On Wed, Dec 22, 2004 at 02:53:47 -0800, Pat Hayes wrote: > > >On Wed, Dec 22, 2004 at 05:26:01PM +0000, Andy Seaborne wrote: > > >> >Yes, but SQL for eg. has tri-value logic (true, false and NULL), so you > > >> >can meaningfully apply operators and functions to unbound values (NULL). > > >> > > >> It doesn't quite work out that simply. It's fine for operators and > > >> functions but pattern matching isn't so straight forward. > > >> > > >> OPTIONAL (<x> ?p ?o) > > >> (?o ?q <y>) > > >> > > >> so ?o may be NULL then we have the (?o ?q <y>) and it needs to handle > > >> ?o = NULL differently. NULL is different. > > > > > >Yes, bun in RDF you cant have a triple like (NULL ?q <y>), so that match > > >will always fail. Unless I'm missing something. > > > > Er...seems to me that you are missing a use/mention confusion. NULL > > here is supposed to be a value (right?), not a piece of syntax. So > > what does it even mean to put NULL into a triple? Or are you > > suggesting that 'NULL' - that is an actual piece of syntax, a > > four-letter character string - is used as a kind of dummy binding to > > stand for the binding in cases where a variable doesn't have a > > binding? If so, I think this really is a very bad idea. All sorts of > > problems will arise right away: eg two different unbound variables > > will be the same. It would be much better to simply leave the > > variable in the pattern in cases like this. > > I was doing a subsitution, as in: > > ?x is unbound, (?x ?q <y>) > > We dont have a symbol for unbound, so I co-opted NULL. Old habbits die > hard. > > BTW, in your proposed expressions involving unbound values are false > scheme, would !(?x == ?y) be true or false, if ?x is unbound. I'm not > clear on how far up the expression tree unboundedness propagates. > > > > > Talking about NULLs, with all it special cases for matching and function > > >> handling, like NULL != NULL, is no different to talking about unbound > > >> variables. Both need special handling. > > > > > >There are no special cases. Any arithemtic operation involving NULL is > > >NULL, so NULL == NULL is NULL, NULL > 3 is NULL, ... > > > > Does NULL match NULL? If ?x and ?y are both bound to NULL, are the > > bindings the same? And so on. > > Not in SQL. I not holding that up as a shining example of rightness > though. In algae2, NULL != NULL . Algae2 preserves query order when performing a query. To that end, optionals either bind the affected variables to either a matched value or NULL. Affected variables are those mentioned in the pattern (including nested patterns) that are not yet bound. All the test cases that I dreamed up bahaved intuitively when comparing NULLed variables. What's the difference between a syntactically differentiated NULL binding and a binding which is conscientiously omitted from the results? -- -eric office: +81.466.49.1170 W3C, Keio Research Institute at SFC, Shonan Fujisawa Campus, Keio University, 5322 Endo, Fujisawa, Kanagawa 252-8520 JAPAN +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA cell: +81.90.6533.3882 (eric@w3.org) Feel free to forward this message to any list for any purpose other than email address distribution.
Received on Wednesday, 19 January 2005 05:00:15 UTC