Translation tables (was: Re: Comments on the SQL-based proposal)

Hi Souri,

On 17 Aug 2010, at 00:04, Souri Das wrote:
> - Regarding Comment 2.5 (Lookup Table): How can we translate a  
> SPARQL query with FILTER involving transformed values?
>
>  Example: Consider the following SPARQL query involving a  
> property, :transfProp, whose values are transformed, via a lookup  
> table, into (-1) times the original value
>       (e.g., 10 in an INTEGER column, i.e., "10"^^xsd:integer in  
> RDF, is transformed into "-10"^^xsd:integer):
>
>       SELECT ?x ?y WHERE {?x  :transfProp ?v1 . ?y   :transfProp  ? 
> v2 . FILTER (?v1 > ?v2)}
>         How can SQL know, without having the lookup table somehow  
> specified (in a CASE statement or something equivalent), how to  
> evaluate the FILTER clause?

In this example, the table has to be translated to CASE or nested IFs  
by the SPARQL-to-SQL engine. Depending on the SPARQL query, this  
translation may or may not be necessary.

The main point IMO is that SQL is not a good choice of language for  
expressing a translation table, especially if the table is a bit  
larger. If you imagine a graphical tool that supports the creation of  
mapping files, I believe you'd want to have a separate widget for  
editing the table, rather than typing it out as a CASE expression.

Best,
Richard


>
> Thanks,
> - Souri.
>
>

Received on Tuesday, 17 August 2010 05:07:26 UTC