Re: Query, rules and RDF datatyping

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Geoff Chappell <geoff@sover.net> writes:

> So do I understand correctly that it's not currently possible to return
> bindings from constraints in a RDQL query? And that's what you need to
> support your datatyping rules? I'd always wondered why the two pieces
> were separate - triple bindings and additional constraints - i.e. why
> isn't it just:
>
>  WHERE
>     :vehicle :standingCapacity ?x .
>     :vehicle :seatedCapacity ?y .
>     ?x + ?y = ?z .

I guess the distinction is that the constraints in the AND clause are:

1) Outside the RDF model in that they can have relations between
literals (eg ?a = 'hello' - stupid, but you can do it) and 2) The
relations are defined in the implementation. For example in the regexp
constraint "?a =~ '*ello'" the relation is 'expressed' in code. In my
Squish implementation for RubyRDF you can define constraints by giving
an identifier (eg: ex:relation) and a Proc (lambda) returning a
boolean.

That isn't to suggest that one needs to give them their own clause,
of course.

> This gets you into the finite domain constraint world, doesn't it - i.e.
> you need some way of enumerating the possible (finite) values for a
> particular variable (and hopefully some means of propagating constraints
> to avoid combinatorial hell and make it practical with non-toy domains.)
>

Yes, I look forward to implementing '?z > 0'. That would be some
binding :-)
  
>> #g
>> --
>
>
> Geoff Chappell

Damian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQE/hGFKAyLCB+mTtykRAkisAKCkTmha3BVS9D7egTPHC9vZa/lZEwCgvn6o
cvOZ3tmwZe9oKpPIgkpP7wU=
=xflm
-----END PGP SIGNATURE-----

Received on Wednesday, 8 October 2003 15:11:09 UTC