Re: How to find persons who like red fruits or crunchy veggies?

From: Neo <neo55592_at_hotmail.com>
Date: 16 Nov 2006 07:52:34 -0800
Message-ID: <1163692354.057450.105450_at_e3g2000cwe.googlegroups.com>


> For what dbd schema did you issued this query? > Would you show me exact definition of dbd schema?

Dbd's "schema" is approximately as follows: A sheet of paper with infinite lines (limited by memory), where each lines can have a sentence of any length (usually 3 words).

This "schema" permits the following example:

(new 'red 'color)
(new 'yellow 'color)
(new 'green 'color)

(new 'soft 'texture)
(new 'crunchy 'texture)

(new 'apple 'fruit)
(create apple color red)
(create apple texture crunchy)

(new 'banana 'fruit)
(create banana color yellow)
(create banana texture soft)

(new 'celery 'veggie)
(create celery color green)
(create celery texture crunchy)

(new 'zuchinni 'veggie)
(create zuchinni color green)
(create zuchinni texture soft)

(new 'tomato 'fruit 'veggie)
(create tomato color red)
(create tomato color yellow)
(create tomato color green)
(create tomato texture soft)

(new 'like 'verb)

(new 'john 'person)
(create john like banana)
(create john like celery)

(new 'mary 'person)
(create mary like apple)
(create mary like zuchinni)

(new 'bob 'person)
(create bob like banana)
(create bob like zuchinni)
(create bob like tomato)

(new 'sue 'person)
(create sue like banana)
(create sue like zuchinni)

(; Who likes red fruits or crunchy veggies?)
(; Finds john, mary and bob)
(and (select person instance *)

     (select * like (or (and (select fruit instance *)
                                    (select * color red))
                             (and (select veggie instance *)
                                    (select * texture crunchy)))))


See www.dbfordummies.com/NLI/new.asp for details on new function. Received on Thu Nov 16 2006 - 16:52:34 CET

Original text of this message