Re: Q: ISSUE-41 bNode semantics

Pat, Michael,

I'll add a bit of context.

Given a Person table with columns <ID, name, date_of_birth> and a single row <1, Alice, NULL>, the Direct Mapping would currently produce:

<Person/ID=1> a <Person> .
<Person/ID=1> <Person#name> "Alice" .

The question we are considering is if we should produce an additional triple. Answers that suggest themselves are:

a) No.

b) <Person/ID=1> <Person#date_of_birth> [] .

c) <Person/ID=1> <Person#date_of_birth> rdb2rdf:NULL .

d) <Person/ID=1> <Person#date_of_birth> "NULL"^^rdb2rdf:NULL .

The specific sub-question that we couldn't agree on during the call was whether b) would be consistent with the semantics of blank nodes in RDF.

FWIW, below are some quotes from the SQL spec (specifically, from Part 1 of the 2006 draft of SQL-2008 that I sent around before.)



null value: A special value that is used to indicate the absence of any data value. (p5)

4.4.2	The null value

Every data type includes a special value, called the null value, sometimes denoted by the keyword NULL. This value differs from other values in the following respects:

Since the null value is in every data type, the data type of the null value implied by the keyword NULL cannot be inferred; hence NULL can be used to denote the null value only in certain contexts, rather than everywhere that a literal is permitted.

Although the null value is neither equal to any other value nor not equal to any other value  it is unknown whether or not it is equal to any given value  in some contexts, multiple null values are treated together; for example, the <group by clause> treats all null values together. (p15)

On 17 May 2011, at 19:13, Michael Hausenblas wrote:

> Pat,
> In today's telecon we had a discussion regarding ISSUE-41 [1] and would appreciate a short advise from your side concerning the following question:
> [[
> Is a blank node an accurate representation of a NULL value from a relational database?
> ]]
> Note that this relates to the Direct Mapping (in R2RML one can overwrite the behaviour). We have identified options for dealing with the situation (producing no triple or introducing a bNode representing the NULL value) and would like to hear your opinion on the matter.
> Tracker, this is my ACTION-131.
> Cheers,
> 	Michael
> [1]
> --
> Dr. Michael Hausenblas, Research Fellow
> LiDRC - Linked Data Research Centre
> DERI - Digital Enterprise Research Institute
> NUIG - National University of Ireland, Galway
> Ireland, Europe
> Tel. +353 91 495730

Received on Tuesday, 17 May 2011 18:57:23 UTC