NULLs and the direct mapping (ISSUE-42) (was: Re: Q: ISSUE-41 bNode semantics)

On 19 May 2011, at 13:10, David McNeil wrote:
> I think this applies mostly to ISSUE-42 (Direct Mapping & NULL values) rather than ISSUE-41 (R2RML & NULL values), although it might make sense to facilitate this approach in R2RML.

Yes -- it should say ISSUE-42 really. I changed the subject accordingly.

> Furthermore with the NULL values present in the Direct Mapping triples it is possible (albeit cumbersome) to write SPARQL queries that take into account the SQL semantics of NULL.


I believe that's possible already, without translating NULLs. Where do you see difficulties with that?

> The NULL value needs to be included for cases like:
> 
> ID NAME
> 100 Joe
> 200 Bob
> 300 Sue
> 
> ID AGE
> 100 30
> 200 NULL
> 
> In this example the generated <bob> <age> <NULL> triple is different than the lack of such a triple for Sue.

Not sure if I understand, but isn't this taken care of by the rdf:type and ID triples that are produced for Bob, and not produced for Sue?

Let's assume the tables are called P_NAME and P_AGE. Without NULLs we'd get:

<P_NAME/ID=100> a <P_NAME>; <PNAME#ID> 100; <P_NAME#NAME> "Joe".
<P_NAME/ID=200> a <P_NAME>; <PNAME#ID> 200; <P_NAME#NAME> "Bob".
<P_NAME/ID=300> a <P_NAME>; <PNAME#ID> 300; <P_NAME#NAME> "Sue".

<P_AGE/ID=100> a <P_AGE>; <PNAME#ID> 100; <P_AGE#AGE> 30.
<P_AGE/ID=200> a <P_AGE>; <PNAME#ID> 200.

Best,
Richard

Received on Thursday, 19 May 2011 14:11:36 UTC