Re: R2RML - Last Call Comments

Hi David,

On 7 Nov 2011, at 17:04, Richard Cyganiak wrote:
>> * "SELECT * FROM ({child-query}) AS child, ({parent-query}) AS parent" - From a SQL perspective, this feels wrong because it doesn't address the issue of column name collisions between the child and parent query. Is the thought that we can just ignore this because we describe in section 11 that the projected columns are split between child and parent?
> 
> I'm not sure if I thought this through when writing the section. I don't fully understand the need and motivation for the referencing object map feature, and don't have a clear picture of how it should operate.
> 
> I created ISSUE-71 for this.
> http://www.w3.org/2001/sw/rdb2rdf/track/issues/71

Let's assume table T1 with one column C, and table T2 with another column C, and a referencing object map that joins both. The joint SQL query might be:

   SELECT *
     FROM (SELECT C FROM T1) AS child,
          (SELECT C FROM T2) AS parent
    WHERE …

The result of this query is a two-column result; both columns are called “C”, and they appear in the same order as in the query.

I have found no evidence in the SQL spec that such a query result with two identically named columns is invalid. The SQL implementations that I tried certainly allow it.

So I changed the wording in Section 11.1 a little bit:

[[
   4. Let n be the number of columns in the logical table of the triples map
   5. Let rows be the result of evaluating the joint SQL query of the referencing object map
   6. For each row in rows, apply the following steps:
      1. Let child_row be the logical table row derived by taking the first n columns of row
      2. Let parent_row be the logical table row derived by taking all but the first n columns of row
]]

As you can see, the definitions of child_row and parent_row now refer to the position of the columns within the joint row, and not to the name of the column as before.

I believe that this change fixes ISSUE-71, which I've set to pending review, and addresses your LC comment quoted at the top of this message. Please let us know if you're satisfied with this explanation and change.

Best,
Richard

Received on Monday, 14 November 2011 17:22:27 UTC