- From: Enrico Franconi <franconi@inf.unibz.it>
- Date: Thu, 19 May 2011 21:14:33 +0200
- To: Juan Sequeda <juanfederico@gmail.com>
- Cc: Michael Hausenblas <michael.hausenblas@deri.org>, W3C RDB2RDF <public-rdb2rdf-wg@w3.org>
- Message-Id: <64B15607-192D-42D1-A6F4-619E88A10D27@inf.unibz.it>
How comes that Query A on DB1 DM_No_Nulls gives you { {A = null} } ?
--e.
On 19 May 2011, at 16:43, Juan Sequeda wrote:
> Enrico and all,
>
> I added my comment and proposal:
>
> http://www.w3.org/2001/sw/rdb2rdf/wiki/RDBNullValues#Comments_and_Proposal_by_Juan
>
> Unfortunately I have to run and won't be able to finish (showing Query C).
>
> I see Enrico's point, however, the point I want to make is that there exist a SPARQL query that will get you the correct answer. The issue then become how to translate a SPARQL query to a SQL query ... and that is not in the scope of this group.
>
> It seems that the rule of thumb is, if there are nulls in the database, and we are not translating them, then you have to use SPARQL Optional.
>
> Juan Sequeda
> +1-575-SEQ-UEDA
> www.juansequeda.com
>
>
> On Thu, May 19, 2011 at 9:18 AM, Enrico Franconi <franconi@inf.unibz.it> wrote:
> The third query (Q1 MINUS Q2) has two components.
> Q1 selects the identifiers of all the tuples.
> Q2 selects the identifiers of the tuples which have an existing value for the other attributes.
>
> It turns out that in SQL the two components can be written in the very same way, since a tuple can not have a 'hole' - namely a missing value (due to the 1NF):
>
> (select ID from R) MINUS (select ID from R) :-)
>
> On the other hand, in the current status of the direct mapping, you can have a 'hole' in a tuple, since NULL values are not translated. Therefore the two components are not the same anymore.
>
> cheers
> --e.
>
> On 19 May 2011, at 15:55, Juan Sequeda wrote:
>
>> Enrico,
>>
>> I'm trying to understand your proposal and comments on the wiki in order to come up with my proposal using your same examples and queries. I do not want to be sloppy :) ... so I'm writing the queries in SQL.
>>
>> Query A: select A from R
>> Query B: select * from R as x, R as y where x.A = y.A
>>
>> However, I'm unsure how to write Query C (it's a bit confusing using a sparql-like graph query syntax over relational tables). As I understand this query is to select all the rows of the table R except the rows that have a value in the attribute A. Is this right? If so, the SQL query would be
>>
>> select * from R where id not in ( select id from R where A is not null)
>>
>> Thanks for your clarification. With this, I will be able to present my proposal
>>
>> Juan Sequeda
>> +1-575-SEQ-UEDA
>> www.juansequeda.com
>>
>>
>> On Thu, May 19, 2011 at 8:05 AM, Enrico Franconi <franconi@inf.unibz.it> wrote:
>>
>> On 19 May 2011, at 10:35, Michael Hausenblas wrote:
>>
>> > http://www.w3.org/2001/sw/rdb2rdf/wiki/RDBNullValues
>>
>> I've committed in the Winki my part of the story.
>> I hope it is clearer now.
>> --e.
>>
>>
>
>
Received on Thursday, 19 May 2011 19:15:03 UTC