W3C home > Mailing lists > Public > www-rdf-interest@w3.org > January 2002

RE: how does existing RDF software handle this datatypes test?

From: Seaborne, Andy <Andy_Seaborne@hplb.hpl.hp.com>
Date: Thu, 31 Jan 2002 10:52:43 -0000
Message-ID: <5E13A1874524D411A876006008CD059F038D34E5@0-mail-1.hpl.hp.com>
To: "'Dan Connolly'" <connolly@w3.org>
Cc: www-rdf-interest@w3.org, www-rdf-logic@w3.org
Full results for RDQL are below.  Three ways to do the query using (1)
literal comparision (query variables are not bNodes), (2) string comparison
and (3) integer comparison.  Summary: the queries do match the data.

I'm confused by:

> The TDL position (as I understand it) is: no...
> That document doesn't say that Mary's age is
> the same as the Film's title. There's probably
> a range constraint on ex:age that says it's
> an integer; not a numeral, but a real integer.

This is not what the data says as I read it.  There are no range constraints
specified.  Is the example data complete?  If RDFS information is provided
then it could be included in the query.

If type information were available, Geoffs comments about suporting non-tidy
literals could apply to RDQL.

	Andy

Notes:
The RDQL result formatter prints bNodes so the internal objects can be
reconstructed.  It isn't meant to be pretty!.

----------------------------------------------------------

Query:
SELECT *
WHERE
  (?x, <dc:title>, ?z1) ,
  (?y, <exv:age>,  ?z2)
AND
  // Interger equality
  ?z1 == ?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 == ?z2 )

x                              | z1   | y                      | z2  
=====================================================================
<anon:7934ad:ebbc0029b3:-8000> | "10" | <urn://thisFile/#mary> | "10"

Results: 1

----------------------------------------------------------

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:ebbc00c298:-8000> | "10" | <urn://thisFile/#mary> | "10"

Results: 1

----------------------------------------------------------

Query:
SELECT *
WHERE
  (?x, <dc:title>, ?z1) ,
  (?y, <exv:age>,  ?z2)
AND
  // Interger equality
  ?z1 == ?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 == ?z2 )

x                              | z1   | y                      | z2  
=====================================================================
<anon:7934ad:ebbc0113f4:-8000> | "10" | <urn://thisFile/#mary> | "10"

Results: 1
Received on Thursday, 31 January 2002 05:53:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:52 GMT