Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> comp.databases.theory -> Re: The wisdom of the object mentors (Was: Searching OO Associations with RDBMS Persistence Models)

Re: The wisdom of the object mentors (Was: Searching OO Associations with RDBMS Persistence Models)

From: Neo <>
Date: 2 Jun 2006 21:57:30 -0700
Message-ID: <>

> Neo, you keep posting this stuff I don't see and can't imagine what the output would be.

:) It is very similar to submitting SQL script to an RMDB. Let me see if I can draw simple analogies to MS Access. You might want to see recent thread titled "Modelling Complex Sentences" where I answered similar questions. They are also documented at the web site under the On Line Manual section.

In general, submitting an expression such as "(create person instance (new))" from the GUI, cause a new tree node to appear in the appropriate part of the tree. In general, submitting an expression such as "(select person instance *)" from the GUI, causes appropriate tree node(s) to be highlighted one by one with a dialog box prompting user to continuing to next one. Example 7
( has links to page which show how to do the GUI equivalent via its API. A user can also accomplish somethings graphically via the tree and grid itself. For example, to add a new "table row", just type in "values" or select them from drop down list in last row of grid, similar to Access. To create a new instance of person via the tree, select tree node with path dir/item/person/instance and click the create new thing button in tool bar. A new node appears in appropriate part of tree with insertion bar in node's label. Type in it's name (ie john) and hit enter. Dbd translates these GUI actions to appropriate structures in db.

Basic aspects are documented at Various aspects of the GUI are documented at Various aspects of the Language Interface are documented at
How to do basic things is documented under Various example are documented at

> I see '(create..' and ('select...' and '(and...' and '(;...' all over the place -- but no output.

This is similar to SQL script. The output isn't seen here in Google, but in the appropriate db's (or app's) interface. When such expression are issued from dbd's GUI, the output is graphical, meaning appropriate things are created/deleted/selected in the tree.

In a RMDB, when one issues the command (either via SQL or indirectly via GUI) "INSERT INTO T_Person (john, male);", this ultimately creates a tuple in relation T_Person whose attributes name and gender are set to values john and male. That tuple then becomes visible in the GUI for  table named T_Person.

In DBD, the following expressions implement the approximate equivalent and result as new nodes in the tree and rows in the grid. Note that in dbd, there is an equivalent of a seperate "table" for name and gender and dbd automatic relates appropriate IDs between "tables".

(; This is a comment. Comments start with a semi-colon. Create a person named john who is male)

(create person instance (new))
(create (it) name (word+ 'john))
(create (it) gender (select+ age instance 'male))

The effect of the above then becomes visible in the tree (and possibly in the grid).

For '(create..', see and

For '(select..', see

For '(;...', see

For (and...', see

> Is it in the table that appears at the bottom of your interface?

In general, the result of submitting expression via the GUI is displayed in the tree (because it is the more flexible).

> What's a class directory? What's a main directory? What's an (it)?

The class directory is a thing or node, similar to a thing or node for john or mary. The class directory (named clsDir) is created by dbd itself upon creating a new db file. The class directory has references to classes. When dbd creates a new file, it automatically creates basic classes and enters them in the class directory. Some of those classes are symbol, word, verb, function, stack, directory, etc. When the user creates classes, it is optional whether to enter them in the class directory much like the entry for a person in a phone book. The class directory is in the main directory (simply named dir).

The main directory is the first node loaded into the tree. It is similar to the directory in main lobby of a building. Again entries are optional. Suppose we need the following classes: person, gender, race and ss#. One can choose to list person in both main and class directories. One can choose to list gender and race in the class directory but not the main directory. And one can choose not to list the ss# class in either directory. Both main directory and class directory are instances of the class directory. One can make as many directories as one desires and arrange them as one desires and choose to enter or not enter things in them. Note, this does not result in redundant data as they are data-independent references to actual thing.

> What are those hex-digit-looking things?

In the table, the first column is the thing's ID. To save space, the ID is in hexidecimal format rather than decimal. These IDs are auto-generated and for the most part, users don't deal with them.

> What are those splats?

It represents a set of things returned by a query. For example "(select clsDir item *)" would cause each class directory item to be highlighted in sucession, when issued from the GUI. When issued via API, one would loop thru a set of things programmatically. See

> What are those instances?

For example, john and mary are intances of the class person; red and blue are instances of color, etc. When one create tuples named john and  mary in T_Person, or tuples named red and blue T_Color, he is doing the equivalent, creating "instances".

> What are those +'s?

Some functions have a + after it. In general, a function with a + after it means, create appropriate thing if it doesn't already exist. For example (word 'john) returns a reference to existing word whose string is john. If such a word does not exist, no reference is return. Where as (word+ 'john) would create a word with string john if it did not exist. See

> What's a type?

In dbd, type and class are the same concept.

> What do all those &s do?

In general, it limits things to that which are in common to all subExpression.
For instance if "(select person instance *)" returns john, bob and mary.
Then "(and (select person instance *) (select * gender male))" would only return john and bob.


> You keep asking someone to demonstrate that some RDBMS can do what [db for dummies] can do -- but what is it doing?

:) In general, it is doing what a database does. It is providing a general/flexible/systematic method of
representing/querying/manipulating representations of things. Received on Fri Jun 02 2006 - 23:57:30 CDT

Original text of this message