Re: Modelling Complex Sentences

From: Neo <neo55592_at_hotmail.com>
Date: 5 May 2006 12:05:24 -0700
Message-ID: <1146855924.345627.198550_at_j33g2000cwa.googlegroups.com>


> I'm not replying to the post; I'm simply trying to grok this.

:) Ok, now pretend you are not reading my responses.

>> (; Create a flower named flower1)
>> (new 'flower1' 'flower')
>
> So "new <literal> <type>" creates something?

In dbd, each expression/statement/sentence starts with "(" and ends with ")". An expression can contain 1 to many elements. The first element is the function/command which in this case is "new". This causes dbd to create a new "node" (similar to an atom in Prolog, similar to a con in LISP, similar to a table/tuple in RM). I call it a "node" mainly because it becomes part of a network (yeah I know, I am re-inventing the network data model). The remaining elements are called parameters. The new function can have 0 to many parameters. The first parameter (if present) is a string that symbolizes a word that names the thing being represented. The remaining parameters (if present) relate the new thing to specified classes. If those classes don't exist, they are created.

>> (; Create flower1 attribute brightest color is fluorescent red)
>> (; Long method)
>> (create bright modify color)
>
> and "create <something> [attribute|modify]" creates something?

Yes, it creates a "node" to represent the specified relationship. In RM, it might be similar to INSERT INTO T_Relationship (bright, modify, color).

>> (create (select flower1 attribute (select bright modify color))
>> is
>> (select fluorescent modify red))
>
> and "create <a selected something> is <a selected something>"
> creates something?

Similar to above except, the subject and object are determined by select queries. And each subexpression within select is similar to a join in RM.

> and "is" and "was" and "on" are... what? how 'bout "willBe?"

Good observation. When a new db is created, dbms enters basic things which includes "is", "was" and "willBe" which are classified as tense currently.

>> (; Create john says
>> "flower1 attribute brightest color willBe fluorescent blue
>> on friday")
>
> so the expression in double quotes is _______.

An expression with the function named ";" is a comment. This is similar to LISP however they do not include the surrounding parentheses.

> and the magic words "flower," "person," etc. are... what? declared? defined?

They were created by the new function as described above.

> but the magic "attribute" and "verb" aren't?

Good observation. When a new db is created, dbms enters basic things which includes "attribute" and "verb".

>> (create john
>> say
>> (select flower1
>> attribute
>> (select bright modify color)
>> willBe
>> (select fluorescent modify blue)
>> on friday))
>
> "select" denotes <something?>

Select selects a "node" that represents that specified by parameters which in this case is a relationship. This is similar to SELECT * FROM T_Relationships WHERE subject=bright, verb=modify, object=color;

> I'm not throwing rocks.

Then what does the comment "For some reason the phrase 'box of rocks' keeps popping into my thoughts." mean?

> I tried the links to db-whatever.com and got nowhere.

I haven't been stating the website as many c.d.t. members accuse me of being an snake oil salesman.

> Have you got any guide to the grammar?

Yes.

> Semantic decoder?

Not sure exactly what you mean but most likely the answer is no; however, this doesn't prevent dbd from answering complex queries when formed correctly by app/user.

> I mean, comment after comment says "create," but I can't figure out what's being created.

Are you familiar with the CREATE and INSERT commands in RM? The concept is similar.

> Are "new," "create," and "select" all there is?

No, there are a few more, but new, select, create, update and delete are the core functions currently. Received on Fri May 05 2006 - 21:05:24 CEST

Original text of this message