- From: Richard Cyganiak <richard@cyganiak.de>
- Date: Wed, 11 May 2011 08:59:18 +0100
- To: Robert Scanlon <rscanlon@revelytix.com>
- Cc: David McNeil <dmcneil@revelytix.com>, RDB2RDF WG <public-rdb2rdf-wg@w3.org>
Hi Robert, The way I look at things, what you're defining here isn't really a join, but it's an assertion that a foreign key relationship holds between certain (possibly computed) columns, and that this FK relationship is used in the RDF mapping. The specific type of join (inner/outer/left) that will be used depends on the SPARQL query that is being asked. OPTIONAL usually translates to a left join, BGPs translate to an inner join. There might be use cases for specifying the type of join directly as part of the mapping, but I have trouble coming up with any -- which is perhaps just because my brain is stuck in the way D2RQ does things after all these years. (There *might* be an argument here about changing the terminology in R2RML from talking about “joins” to talking about some sort of “key” or “reference” or whatever. Anyone has any thoughts on that?) Best, Richard On 11 May 2011, at 04:18, Robert Scanlon wrote: > Hi Richard and David, > > Just curious, and apologies if I'm missing the context from weekly discussions that may have covered this, but isn't there also the issue of the various *types* of joins to consider? I see from one of the spec drafts (excerpt below) that this issue actually also proposes support for only simple SQL expressions, as opposed to the original "the join condition may be as complex as allowed by SQL". Has it already been decided to support only equality (inner) join syntax, or is that an implied part of what you're discussing? If that decision has not yet been made, then it seems like this issue really has 3 aspects: > > 1) curly braces / referencing mechanism > 2) multiple columns (or parts) in join clause > 3) types of joins - inner, outer, left outer, right outer, ... > > If all 3 have to be supported, then some form of string with embedded table.column references may be the simplest. (Basically, something similar to what's there now, just address whatever issues are with the curly braces). > > If only simple joins are to be supported now, then forget all of the above. :-) > > Bob > > ------------------------------- > From http://www.w3.org/2001/sw/rdb2rdf/r2rml/#RefObjectMapClass_joinCondition_Property: > Note that the join condition may be as complex as allowed by SQL. > > ISSUE-32: The snytax of rr:joinCondition is still under discussion. It has been suggested that it should not use curly braces to delimit the logical tables. It has also been suggested that instead of arbitrary SQL, only simple equality expressions should be allowed. > > > > > > On Tue, May 10, 2011 at 4:41 PM, Richard Cyganiak <richard@cyganiak.de> wrote: > > On 10 May 2011, at 21:32, David McNeil wrote: > > If you're violently opposed to lists, then how about the last option I mentioned: > > > > [] rr:parentTriplesMap <#TriplesMap1>; > > rr:join "col1,col1", "col2,col2"; > > > > This keeps the columns that are being checked *very* close to each other ;-) > > > > Indeed. I didn't notice the first time I read this that you put the two col1's together in this notation. So the first value always refers to the child table? Seems a bit too obscure for my taste. > > Fair enough -- it's not very explicit. > > Let me do one more try: > > [] rr:parentTriplesMap <#TriplesMap1>; > rr:joinChildParent "col1=>col1", "col2=>col2"; > > Or maybe > > rr:joinFromTo "col1=>col1", "col2=>col2"; > > Any better? > > Richard >
Received on Wednesday, 11 May 2011 07:59:48 UTC