Re: ISSUE-41 bNode semantics: Information preservation

On 24 May 2011, at 13:29, Richard Cyganiak wrote:

> On 24 May 2011, at 12:00, Richard Cyganiak wrote:
>> Unfortunately, we know that there cannot be a semantics preserving mapping from relational databases to RDF in the presence of NULLs. NULLs in SQL can indicate the absence of a value, and negation cannot be expressed in RDF.
> 
> Thinking more about it, this might not be true.
> 
> NULL in SQL means: “Either this has an unknown value, or it has no value.”
> 
> I'll try to restate that in logical terms.
> 
> A(?x, NULL) means: There exists some ?y such that A(?x,?y) or there exists no ?y such that A(?x,?y).
> 
> That says exactly nothing. It is trivially true.
> 
> So, not creating a triple for NULL is actually semantics-preserving. Or is it? This sounds too simple to be true, so I probably made some stupid mistake.

It is more complex than this. Even negation is not enough (naively speaking).
In reality, SQL NULLs are only defined behaviourally by the SQL specs: the 3VL within the WHERE clause, the behaviour of set-baset operators (union/ intersection, etc), the nested queries, etc.
I am working since a year on a formalisation in model theory of this, which turns out to be not trivial (there is none so far capturing exactly SQL NULLs - all the theoretical works started with the silly assumption "SQL did it wrong, while us... etc etc").
Indeed the right way to look at it is by the "absence or some value", but note that this is not a tautology, since the absence of value changes the arity of that particular tuple within the relation.
As soon as we have a draft we trust on, I'll circulate it.
cheers
--e.

Received on Tuesday, 24 May 2011 12:37:03 UTC