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: Neo <neo55592_at_hotmail.com>
Date: 31 Mar 2006 19:17:37 -0800
Message-ID: <1143861457.220413.266760@g10g2000cwb.googlegroups.com>


>>> (create 'c' 'a' 'r')
>>>
>> Why does car have to be written 'c' 'a' 'r'?
>> Why not (create "car")

Because the create function creates a relation between two or more parameters where each parameter is separated by a space. In the syntax (create "car"), there is only one parameter (as far as the parser can determine according to the simple rules it knows).

>> And it could probably be simpler than that.
>>
>Yes. car

The problem with simplying 'c' 'a' 'r' to "car" to car is how to distinguish between:

1) the vehicle car
2) the name car
3) the string car
4) and the individual symbols c, a, r.

In order to facilitate recursion, ideally there should be a simple rule that is applied over and over again. The side affect is that what humans perceive to be a simple thing is actually quite high level and requires many recursions to acheive.

Below is a simple and systematic way:

Symbol c: c
Symbol a: a
Symbol r: r

String car: (select c a r)
Name car: (select * symbol (select c a r)) Vehicle car: (select * name (select * symbol (select c a r)))

As you can see, referring to something simple like the vehicle car, already required quite a few recursions. To reduce this burden, currently I have grudgingly adopted the following conventions which are translated to their equivalent by the parser.

'c' => Symbol c
'a' => Symbol a
'r' => Symbol r
'car' => String car: (select c a r)

No shortcut for name car
car or "car" => Vehicle car: (select * name (select * symbol (select c a r)))

Thus, there is quite a bit more behind a simple looking expression like (create god child adam). Received on Fri Mar 31 2006 - 21:17:37 CST

Original text of this message

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