- From: Seaborne, Andy <Andy_Seaborne@hplb.hpl.hp.com>
- Date: Thu, 31 Jan 2002 12:08:27 -0000
- To: "'Patrick Stickler'" <patrick.stickler@nokia.com>, RDF Interest <www-rdf-interest@w3.org>, RDF Logic <www-rdf-logic@w3.org>
RDQL results for "take 2". Results as I expected :-) The runs are: 1/ Global datatyping - no matches 2/ Local datatyping - check variable of same type - no matches 3/ Local datatyping - get types of variables, must be same - no matches 4/ Local datatyping - get types of variables, test types - no matches 5/ Old query 1 : Global datatyping, no type checking - 1 match 6/ Old query 2 : Global datatyping, no type checking - 1 match 7/ Old query 1 : Local datatyping, no type checking - no matches 8/ Old query 2 : Local datatyping, no type checking - no matches There are two versions for the local typing case. The alternative version works because bNodes have an internal form that can be used for testing identity. Local datatyping caused the old style query to not match. This is what I expected. "new data (local), old code (not current WG RDF, MT and all)" fails because RDQL does not know anything about the meaning of a bNodes used for type information. Queries 2, 3 and 4 are that query. When datatyping arrives, the application programmer model should mask the detail of the different idioms and graph details. That is a different query language - RDQL is a "graph-access" language in this new world. Andy ------------------------------------------------------------ # Shell command: >> rdql --data data.2.1.xml --query Q.2.1 -v -v Query: // Check whether the properties have the same range. SELECT * WHERE (?x, <dc:title>, ?z) , (?y, <exv:age>, ?z) , (<dc:title>, <rdfs:range>, ?r) , (<exv:age>, <rdfs:range>, ?r) USING dc FOR <http://purl.org/dc/elements/1.1/> , exv FOR <http://example/vocab#> , schema FOR <http://www.w3.org/2001/XMLSchema#> , rdfs FOR <http://www.w3.org/2000/01/rdf-schema#> Parsed query: SELECT ?x, ?z, ?y, ?r WHERE (?x, <http://purl.org/dc/elements/1.1/title>, ?z), (?y, <http://example/vocab#age>, ?z), (<http://purl.org/dc/elements/1.1/title>, <http://www.w3.org/2000/01/rdf-schema#range>, ?r), (<http://example/vocab#age>, <http://www.w3.org/2000/01/rdf-schema#range>, ?r) x | z | y | r ============= Results: 0 LOCAL ===== 2 versions ------------------------------------------------------------ # Shell command: >> rdql --data data.2.2.xml --query Q.2.2 -v -v Query: // Local datatyping. SELECT * WHERE // Must be same node and have same type. (?x, <dc:title>, ?z) , (?z, <rdfs:type>, ?t ) , (?y, <exv:age>, ?z) USING dc FOR <http://purl.org/dc/elements/1.1/> , exv FOR <http://example/vocab#> , schema FOR <http://www.w3.org/2001/XMLSchema#> , rdfs FOR <http://www.w3.org/2000/01/rdf-schema#> , rdf FOR <http://www.w3.org/1999/02/22-rdf-syntax-ns#> Parsed query: SELECT ?x, ?z, ?t, ?y WHERE (?x, <http://purl.org/dc/elements/1.1/title>, ?z), (?z, <http://www.w3.org/2000/01/rdf-schema#type>, ?t), (?y, <http://example/vocab#age>, ?z) x | z | t | y ============= Results: 0 ------------------------------------------------------------ >> rdql --data data.2.2.xml --query Q.2.3 -v -v Query: // Local datatyping. SELECT * WHERE // Must be same node and have same type (?x, <dc:title>, ?z1) , (?z1, <rdfs:type>, ?t ) , (?y, <exv:age>, ?z2) , (?z2, <rdfs:type>, ?t ) AND ?z1 EQ ?z2 USING dc FOR <http://purl.org/dc/elements/1.1/> , exv FOR <http://example/vocab#> , schema FOR <http://www.w3.org/2001/XMLSchema#> , rdfs FOR <http://www.w3.org/2000/01/rdf-schema#> , rdf FOR <http://www.w3.org/1999/02/22-rdf-syntax-ns#> Parsed query: SELECT ?x, ?z1, ?t, ?y, ?z2 WHERE (?x, <http://purl.org/dc/elements/1.1/title>, ?z1), (?z1, <http://www.w3.org/2000/01/rdf-schema#type>, ?t), (?y, <http://example/vocab#age>, ?z2), (?z2, <http://www.w3.org/2000/01/rdf-schema#type>, ?t) AND ( ?z1 eq ?z2 ) x | z1 | t | y | z2 =================== Results: 0 ------------------------------------------------------------ >> rdql --data data.2.2.xml --query Q.2.4 -v -v Query: // Local datatyping. SELECT * WHERE // Must be same node and have same type (?x, <dc:title>, ?z1) , (?z1, <rdfs:type>, ?t1 ) , (?y, <exv:age>, ?z2) , (?z2, <rdfs:type>, ?t2 ) AND (?z1 == ?z2 ) && (?t1 == ?t2) USING dc FOR <http://purl.org/dc/elements/1.1/> , exv FOR <http://example/vocab#> , schema FOR <http://www.w3.org/2001/XMLSchema#> , rdfs FOR <http://www.w3.org/2000/01/rdf-schema#> , rdf FOR <http://www.w3.org/1999/02/22-rdf-syntax-ns#> Parsed query: SELECT ?x, ?z1, ?t1, ?y, ?z2, ?t2 WHERE (?x, <http://purl.org/dc/elements/1.1/title>, ?z1), (?z1, <http://www.w3.org/2000/01/rdf-schema#type>, ?t1), (?y, <http://example/vocab#age>, ?z2), (?z2, <http://www.w3.org/2000/01/rdf-schema#type>, ?t2) AND ( ( ?z1 == ?z2 ) && ( ?t1 == ?t2 ) ) x | z1 | t1 | y | z2 | t2 ========================= Results: 0 OLD QUERIES =========== >> rdql --data data.2.1.xml --query Q.1.1 -v -v Query: SELECT * WHERE // Literal equals - compare representation (?x, <dc:title>, ?z) , (?y, <exv:age>, ?z) USING dc FOR <http://purl.org/dc/elements/1.1/> , exv FOR <http://example/vocab#> Parsed query: SELECT ?x, ?z, ?y WHERE (?x, <http://purl.org/dc/elements/1.1/title>, ?z), (?y, <http://example/vocab#age>, ?z) x | z | y ============================================================================ ================================ <anon:6e3914:ebbc6b8539:-8000> | "10" | <file:///c:/home/afs/Projects/WorkSpace/Test_DanC/data.2.1.xml#mary> Results: 1 ------------------------------------------------------------ >> rdql --data data.2.1.xml --query Q.1.2 -v -v Query: SELECT * WHERE (?x, <dc:title>, ?z1) , (?y, <exv:age>, ?z2) AND // String equals ?z1 EQ ?z2 USING dc FOR <http://purl.org/dc/elements/1.1/> , exv FOR <http://example/vocab#> Parsed query: SELECT ?x, ?z1, ?y, ?z2 WHERE (?x, <http://purl.org/dc/elements/1.1/title>, ?z1), (?y, <http://example/vocab#age>, ?z2) AND ( ?z1 eq ?z2 ) x | z1 | y | z2 ============================================================================ ======================================= <anon:7934ad:ebbc6d3b64:-8000> | "10" | <file:///c:/home/afs/Projects/WorkSpace/Test_DanC/data.2.1.xml#mary> | "10" Results: 1 ------------------------------------------------------------ >> rdql --data data.2.2.xml --query Q.1.1 -v -v Query: SELECT * WHERE // Literal equals - compare representation (?x, <dc:title>, ?z) , (?y, <exv:age>, ?z) USING dc FOR <http://purl.org/dc/elements/1.1/> , exv FOR <http://example/vocab#> Parsed query: SELECT ?x, ?z, ?y WHERE (?x, <http://purl.org/dc/elements/1.1/title>, ?z), (?y, <http://example/vocab#age>, ?z) x | z | y ========= Results: 0 ------------------------------------------------------------ >> rdql --data data.2.2.xml --query Q.1.1 -v -v Query: SELECT * WHERE // Literal equals - compare representation (?x, <dc:title>, ?z) , (?y, <exv:age>, ?z) USING dc FOR <http://purl.org/dc/elements/1.1/> , exv FOR <http://example/vocab#> Parsed query: SELECT ?x, ?z, ?y WHERE (?x, <http://purl.org/dc/elements/1.1/title>, ?z), (?y, <http://example/vocab#age>, ?z) x | z | y ========= Results: 0
Received on Thursday, 31 January 2002 07:08:31 UTC