| 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
> 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 Thu Apr 27 2006 - 23:54:48 CDT
![]() |
![]() |