| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Storing data and code in a Db with LISP-like interface
mAsterdam wrote:
> Neo wrote:
>>>> How do I express the following query in Prolog: >>>> Find a person who likes a fruit and a vegetable. >>>> (and (select person instance *) >>>> (select * like (and (select vegetable instance *) >>>> (select fruit instance *)))) >>> >>> >>> ?- person(P), likes(P, F), likes(P, V), fruit(F), vegetable(V). >> >> I actually expressed what I meant more clearly in the query then in >> english which was ambigious :( I meant find a person who likes >> something that is both a vegetable and a fruit.
That should have been:
P = john
Thing = tomato1 ;
No
![]() |
![]() |