- From: Richard Cyganiak <richard@cyganiak.de>
- Date: Tue, 24 Apr 2012 19:44:35 +0100
- To: Juan Sequeda <juanfederico@gmail.com>
- Cc: W3C RDB2RDF <public-rdb2rdf-wg@w3.org>
Hi Juan, You said in today's call that the current DM behaviour for non-PK tables is motivated by query preservation. And changing it so that it generates lean graphs would not be query preserving. I thought about this and would like to understand how you get to this conclusion. How do you define query preservation? I would define it like this: Given a direct mapping function from DBs to RDF graphs, let's call it DM(db), and given a SPARQL-to-SQL query rewriting function, let's call it RW(q), RW is query preserving with respect to DM iff for any SPARQL query q and database db, the result of executing q over DM(db) is the same as the result of executing RW(q) over db. Now I don't see why we can't have a query rewriting algorithm that isn't query-preserving with respect to the “lean” direct mapping. All we'd need to do is to make sure that DISTINCT is applied to any non-PK tables in the SQL query before we further query that table. Best, Richard
Received on Tuesday, 24 April 2012 18:45:05 UTC