Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Storing data and code in a Db with LISP-like interface

Re: Storing data and code in a Db with LISP-like interface

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Fri, 21 Apr 2006 14:49:06 GMT
Message-ID: <Ch62g.63678$VV4.1190984@ursa-nb00s0.nbnet.nb.ca>


Pascal Bourguignon wrote:

> Bob Badour <bbadour_at_pei.sympatico.ca> writes:
>

>>Can it handle n-ary relations? Like "John bought 10 apples each at
>>10cents" ?

>
>
> Of course:
>
> bought(john,10,apple,10,cent).
>
> How many apple did john buy?
>
> ?- bought(john,HowMany,apple,_price,_money).

Thank you, that's much more revealing than 100 binary relations.

Does prolog summarize the results? Or does it list each individual purchase?

Consider:

bought(john,10,apple,10,cent).
bought(john,3,apple,15,cent).

?- bought(john,HowMany,apple,_price,_money). Received on Fri Apr 21 2006 - 09:49:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US