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

From: Neo <neo55592_at_hotmail.com>
Date: 27 Apr 2006 21:54:48 -0700
Message-ID: <1146200088.892342.133810_at_e56g2000cwe.googlegroups.com>


> person (john).
> judge (john).
> fruit (apple1).
> fruit (tomato1).
> vegetable (tomato1).
> vegetable (broccoli1).
> thing(X):-vegetable(X).
> thing(X):-fruit(X).

With respect to your comment that dbd's script looks like bitPlumbing, an alternate way of doing the above Prolog statements in dbd is:

(createInst 'john' 'person' 'judge')
(createInst 'apple1' 'fruit')
(createInst 'broccoli1' 'vegetable')
(createInst 'tomato1' 'fruit' 'vegetable')

The createInst function's first parameter is the name for the new instance which is classified by the remaining parameters. If those classifications do not exist, they are automatically created and related as instances of thing. I haven't use this function in dbd scripts thus far as it obscures too many underlying relationships which makes it difficult for users to understand the queries later. Received on Fri Apr 28 2006 - 06:54:48 CEST

Original text of this message