Re: Datatype question

----- Original Message -----
From: "Patrick Stickler" <patrick.stickler@nokia.com>
To: "ext Geoff Chappell" <geoff@sover.net>; "RDF Interest"
<www-rdf-interest@w3.org>
Sent: Tuesday, June 25, 2002 6:33 AM
Subject: Re: Datatype question


>
> On 2002-06-25 13:22, "ext Geoff Chappell" <geoff@sover.net> wrote:
>
> > ... My only point was that queries with
> > multiple conditions are more efficient if those conditions have common
> > bindings - e.g.  I'd rather be waiting for my system to process "{?a ?b
?c}
> > and {?c ?d ?e}"  than "{?a ?b ?c} and {?d ?e ?f} and
> > somefunc(?c)=somefunc(?d)".
>
> Ideally, we should expect a datatype-capable RDF API to handle these
> things for us, such that queries are made based on known values
> rather than their literal denotation in the RDF graph. Such an API
> would also equate the different local vs. global idioms accordingly,
> such that
>
>    Jenny age "010.00" .
>    age rdfs:range xsd:decimal .
>
> and
>
>    Bob age [ xsd:decimal "10" ] .
>
> would be comparable as
>
>    Jenny age ?value .
>    Bob age ?value .
>

I'd expect that would be the case for those datatypes that are natively
supported by a particular system. For example you might rules like the
following to allow such comparisons:

//inline case
infer {?p ?s ?dv} from {[rdfs:range] ?p [xsd:decimal]} and {?p ?s ?o} and
?dv=dec(?o)

//qualified case
infer {?p ?s ?dv} from {?p ?s ?o} and {[xsd:decimal] ?o ?v} and ?dv=dec(?v)

where dec is a function that returns a canonical decimal typed value given a
string representation.

This would allow value comparisons without the combinatorial explosion I was
worried about earlier (so what was my point, exactly? :-)


> Note that no only do the lexical forms differ, but also
> the idioms differ, yet (taking the untidy view) both
> Jenny and Bob have the same age.
>
> The ability to treat the local and global idioms
> as semantically equivalent is a major benefit of
> the untidy approach, since the object of a
> given property always denotes the value.
>
> Note also that this means rdfs:range works the same for
> datatyping as for any RDF typing.
>
> Cheers,
>
> Patrick
>
> --
>
> Patrick Stickler              Phone: +358 50 483 9453
> Senior Research Scientist     Fax:   +358 7180 35409
> Nokia Research Center         Email: patrick.stickler@nokia.com
>

Received on Tuesday, 25 June 2002 06:58:54 UTC