Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Normalizing Every Thing with XDb2

4 views
Skip to first unread message

Neo

unread,
Jul 14, 2004, 10:07:56 PM7/14/04
to
> V Harris wrote: How do you store
> Mr. Brown lives on Brown St.,
> drives a brown car,
> has brown hair,
> wears a brown suit,
> and has one brown
> and one blue eye? [without redundant string 'brown']

I am using a new data model (Thing Model) whose goal is to attain some
fraction of the human brain's flexibility. XDb1 is a limited
implementation of TM. XDb2 will be more complete. The current alpha
version is very basic and its interface quite limited. However, I did
enter the equivalent of the above data using its primitive GUI and
anticipate its NLI (Natural Language Interface) will eventually accept
the sentences below or similar (if one would like to suggest a more
appropriate syntax, I am all ears). Additional info, view of data,
alpha XDb2 and the db are posted at
www.xdb2.com/Example/ThingsNamedBrown.asp

Format "*X Y Z." below implies create a new thing named X and relate X
to Z via Y. Format "* Y Z." implies relate last new thing to Z via Y.
Format "X Y Z" implies relate X to Z via Y. Some basic things (ie
thing, symbol, string, cls, inst, part, asm, etc) are entered into the
db when it is first created.

*live cls relator. (equiv to '*live isa relator' or 'relator inst
*live')
*drive cls relator.
*wear cls relator.

*color cls thing.
*brown cls color.
*blue cls color.

*street cls thing.
*brown cls street.

*car cls thing.
*car1 cls car.
car1 color brown.

*hair cls thing.
*hair1 cls hair.
hair1 color brown.

*suit cls thing.
*suit1 cls suit.
suit1 color brown.

*eye cls thing.
*eye1 cls eye.
eye1 color brown.
*eye2 cls eye.
eye2 color blue.

*person cls thing.
*brown cls person.
* live (street)brown.
* drive car1.
* part hair1.
* wear suit1.
* part eye1.
* part eye2.

---------------

Note: "*brown cls color." would be equivalent to

*. (Create new thing)
* name brown. (Relate new thing to its name, string brown)
* cls color. (Relate new thing to its class, color)

Leandro Guimaraens Faria Corsetti Dutra

unread,
Jul 15, 2004, 10:04:24 AM7/15/04
to
Em Wed, 14 Jul 2004 19:07:56 -0700, Neo escreveu:

> I am using a new data model (Thing Model)

Blah, blah, blah…


--
Leandro Guimarães Faria Corsetti Dutra +55 (11) 5685 2219
Av Sgto Geraldo Santana, 1100 6/71 lea...@dutra.fastmail.fm
04.674-000 São Paulo, SP BRASIL
http://br.geocities.com./lgcdutra/

x

unread,
Jul 15, 2004, 11:38:36 AM7/15/04
to
**** Post for FREE via your newsreader at post.usenet.com ****


"Leandro Guimaraens Faria Corsetti Dutra" <lea...@dutra.fastmail.fm> wrote
in message news:pan.2004.07.15....@dutra.fastmail.fm...


> Em Wed, 14 Jul 2004 19:07:56 -0700, Neo escreveu:

> > I am using a new data model (Thing Model)

> Blah, blah, blah.

I'm sure Neo would think "blah" is redundant here :-)

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
http://www.usenet.com
Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

x

unread,
Jul 15, 2004, 11:43:35 AM7/15/04
to
**** Post for FREE via your newsreader at post.usenet.com ****


Have you seen http://www.jfsowa.com/ ?

Jan Hidders

unread,
Jul 15, 2004, 1:21:40 PM7/15/04
to
On Thu, 15 Jul 2004 18:43:35 +0300, x wrote:

> **** Post for FREE via your newsreader at post.usenet.com ****
>
>
> Have you seen http://www.jfsowa.com/ ?

Actually, it looks more like a clumsy version of the data models of
F-logic (frame logic) and RDF, because relationship (relators, whatever..)
themselves are also objects in the instance.

-- Jan Hidders

x

unread,
Jul 15, 2004, 2:05:13 PM7/15/04
to
**** Post for FREE via your newsreader at post.usenet.com ****


"Jan Hidders" <jan.h...@REMOVETHIS.pandora.be> wrote in message
news:pan.2004.07.15....@REMOVETHIS.pandora.be...

http://www.jfsowa.com/computer/standard.htm

Jan Hidders

unread,
Jul 15, 2004, 2:23:54 PM7/15/04
to
On Thu, 15 Jul 2004 21:05:13 +0300, x wrote:
>
> http://www.jfsowa.com/computer/standard.htm

I couldn't agree more. Google for "xsym xquery light" to understand why.
But what about it?

-- Jan Hidders

x

unread,
Jul 15, 2004, 2:48:46 PM7/15/04
to
**** Post for FREE via your newsreader at post.usenet.com ****


"Jan Hidders" <jan.h...@REMOVETHIS.pandora.be> wrote in message
news:pan.2004.07.15....@REMOVETHIS.pandora.be...

> > http://www.jfsowa.com/computer/standard.htm

Neo is a sign. It's happening !

Jan Hidders

unread,
Jul 15, 2004, 3:05:02 PM7/15/04
to
On Thu, 15 Jul 2004 21:48:46 +0300, x wrote:
>
> Neo is a sign. It's happening !

It's already been happening for quite a while now, long before Neo came.
You hadn't noticed it yet?

-- Jan Hidders

x

unread,
Jul 15, 2004, 3:15:28 PM7/15/04
to
**** Post for FREE via your newsreader at post.usenet.com ****


"Jan Hidders" <jan.h...@REMOVETHIS.pandora.be> wrote in message
news:pan.2004.07.15....@REMOVETHIS.pandora.be...

It's still to complicated :-)

Mikito Harakiri

unread,
Jul 15, 2004, 5:24:34 PM7/15/04
to
neo5...@hotmail.com (Neo) wrote in message news:<4b45d3ad.04071...@posting.google.com>...
> ... XDb2 will be more complete ...

It will not. For one thing, IBM could get after you, because the name
of your innovative product sounds pretty much like infringement of
recognized Db2 trademark. I suggest TNBT(The Next/Neo Big Thing).

Gene Wirchenko

unread,
Jul 15, 2004, 6:55:55 PM7/15/04
to
mikharaki...@yahoo.com (Mikito Harakiri) wrote:

^^^^
Or "Thousand Not Being Transferred"

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.

frosty

unread,
Jul 15, 2004, 8:19:47 PM7/15/04
to
>> neo5...@hotmail.com (Neo) wrote in message
>> news:<4b45d3ad.04071...@posting.google.com>...
>>> ... XDb2 will be more complete ...

> mikharaki...@yahoo.com (Mikito Harakiri) wrote:
>> It will not. For one thing, IBM could get after you, because the name
>> of your innovative product sounds pretty much like infringement of
>> recognized Db2 trademark. I suggest TNBT(The Next/Neo Big Thing).

Gene Wirchenko wrote:
>
> ^^^^
> Or "Thousand Not Being Transferred"

LOL! =`:^Åž POTW, easily.

--
frosty


Christopher Browne

unread,
Jul 15, 2004, 11:27:10 PM7/15/04
to
A long time ago, in a galaxy far, far away, Gene Wirchenko <ge...@mail.ocis.net> wrote:
> mikharaki...@yahoo.com (Mikito Harakiri) wrote:
>
>>neo5...@hotmail.com (Neo) wrote in message news:<4b45d3ad.04071...@posting.google.com>...
>>> ... XDb2 will be more complete ...
>>
>>It will not. For one thing, IBM could get after you, because the name
>>of your innovative product sounds pretty much like infringement of
>>recognized Db2 trademark. I suggest TNBT(The Next/Neo Big Thing).
> ^^^^
> Or "Thousand Not Being Transferred"

I'm glad I didn't have coffee in my hand when I saw that...
--
let name="cbbrowne" and tld="cbbrowne.com" in String.concat "@" [name;tld];;
http://www.ntlug.org/~cbbrowne/languages.html
"Here I am, brain the size of a planet, and they ask me to take you
down the the bridge. Call that job satisfaction? 'Cos I don't."
-- Marvin the Paranoid Android

Gene Wirchenko

unread,
Jul 16, 2004, 11:22:58 AM7/16/04
to
Christopher Browne <cbbr...@acm.org> wrote:

>A long time ago, in a galaxy far, far away, Gene Wirchenko <ge...@mail.ocis.net> wrote:
>> mikharaki...@yahoo.com (Mikito Harakiri) wrote:
>>
>>>neo5...@hotmail.com (Neo) wrote in message news:<4b45d3ad.04071...@posting.google.com>...
>>>> ... XDb2 will be more complete ...
>>>
>>>It will not. For one thing, IBM could get after you, because the name
>>>of your innovative product sounds pretty much like infringement of
>>>recognized Db2 trademark. I suggest TNBT(The Next/Neo Big Thing).
>> ^^^^
>> Or "Thousand Not Being Transferred"
>
>I'm glad I didn't have coffee in my hand when I saw that...

Coffee? *I* do not drink it. It must be some sort of browne
stuff.

Alan

unread,
Jul 16, 2004, 1:29:47 PM7/16/04
to

"Gene Wirchenko" <ge...@mail.ocis.net> wrote in message
news:desff05h3katicrme...@4ax.com...

> Christopher Browne <cbbr...@acm.org> wrote:
>
> >A long time ago, in a galaxy far, far away, Gene Wirchenko
<ge...@mail.ocis.net> wrote:
> >> mikharaki...@yahoo.com (Mikito Harakiri) wrote:
> >>
> >>>neo5...@hotmail.com (Neo) wrote in message
news:<4b45d3ad.04071...@posting.google.com>...
> >>>> ... XDb2 will be more complete ...
> >>>
> >>>It will not. For one thing, IBM could get after you, because the name
> >>>of your innovative product sounds pretty much like infringement of
> >>>recognized Db2 trademark. I suggest TNBT(The Next/Neo Big Thing).
> >> ^^^^
> >> Or "Thousand Not Being Transferred"
> >
> >I'm glad I didn't have coffee in my hand when I saw that...
>
> Coffee? *I* do not drink it. It must be some sort of browne
> stuff.
>

Spelling "Brown" as "Browne" could cause a problem. They both mean the same
thing, so one of them is redundant :)


Christopher Browne

unread,
Jul 16, 2004, 5:54:13 PM7/16/04
to

Aieeehh!! I'm melting!!!

I can feel them chopping bits off of me!!!

I'm being normalized!

Heellp!
--
If this was helpful, <http://svcs.affero.net/rm.php?r=cbbrowne> rate me
http://www3.sympatico.ca/cbbrowne/nonrdbms.html
Een schip op het strand is een baken in zee.

Gene Wirchenko

unread,
Jul 16, 2004, 6:41:19 PM7/16/04
to
Christopher Browne <cbbr...@acm.org> wrote:

>After a long battle with technology, "Alan" <al...@erols.com>, an earthling, wrote:
>> "Gene Wirchenko" <ge...@mail.ocis.net> wrote in message
>> news:desff05h3katicrme...@4ax.com...
>>> Christopher Browne <cbbr...@acm.org> wrote:
>>>
>>> >A long time ago, in a galaxy far, far away, Gene Wirchenko
>> <ge...@mail.ocis.net> wrote:
>>> >> mikharaki...@yahoo.com (Mikito Harakiri) wrote:
>>> >>
>>> >>>neo5...@hotmail.com (Neo) wrote in message
>> news:<4b45d3ad.04071...@posting.google.com>...
>>> >>>> ... XDb2 will be more complete ...
>>> >>>
>>> >>>It will not. For one thing, IBM could get after you, because the name
>>> >>>of your innovative product sounds pretty much like infringement of
>>> >>>recognized Db2 trademark. I suggest TNBT(The Next/Neo Big Thing).
>>> >> ^^^^
>>> >> Or "Thousand Not Being Transferred"
>>> >
>>> >I'm glad I didn't have coffee in my hand when I saw that...
>>>
>>> Coffee? *I* do not drink it. It must be some sort of browne
>>> stuff.
>>>
>>
>> Spelling "Brown" as "Browne" could cause a problem. They both mean the same
>> thing, so one of them is redundant :)
>
>Aieeehh!! I'm melting!!!
>
>I can feel them chopping bits off of me!!!
>
>I'm being normalized!

^^^^^^^^^^
Only in Neo's dreams.

"One is the loneliest number that could ever be...", and Neo is a
twisted one.

Neo

unread,
Jul 22, 2004, 8:16:50 PM7/22/04
to
> x wrote: You should give an example with multiple occurences of quantities.
> Like "this box is 1 cm thick, 1 kg heavy and cost only 1$"

The example at www.xdb2.com/Example/BoxProperties.asp represents a box
whose thickness is 1 cm, weighs 1 kg and costs 1 $. Each property
references the same quantity 1 (ID 2356). The quantity 1 is named by
the symbol 1 (ID 1231). In the third image, parentheses indicate the
number of references to orginal symbol or string.

Neo

unread,
Jul 23, 2004, 8:11:13 PM7/23/04
to
> > V Harris wrote: How do you store Mr. Brown lives on Brown St.,
> > drives a brown car, has brown hair, wears a brown suit,
> > and has one brown and one blue eye? [without redundant string 'brown']
>
> www.xdb2.com/Example/ThingsNamedBrown.asp shows normalization of strings.

www.xdb2.com/Basic/Name.asp shows normalization of symbols in strings.

Neo

unread,
Jul 27, 2004, 6:17:58 PM7/27/04
to
> > a person named brown who lives on brown street, drives
> > a brown car, has brown hair, wears a brown suit, and has one brown
> > and one blue eye (with only one string 'brown').
>
> ...Interface will eventually accept the sentences below or similar ...

Below is the actual script to create the the db (if someone would like


to suggest a more appropriate syntax, I am all ears).

create *live cls relator. // '*x' => create new thing, name it 'x'
create *drive cls relator.
create *wear cls relator.

create *color cls thing.
create *brown cls color.
create *blue cls color.

create *street cls thing.
create *brown cls street.

create *car cls thing.
create *car1 cls car.
create car1 color brown.

create *hair cls thing.
create *hair1 cls hair.
create hair1 color brown.

create *suit cls thing.
create *suit1 cls suit.
create suit1 color brown.

create *eye cls thing.
create *eye1 cls eye.
create eye1 color brown.
create *eye2 cls eye.
create eye2 color blue.

create *person cls thing.

create *. // Create new thing
create * cls person. // Single * refers to last new thing
create * name 'brown'.
create * live (street)brown.
create * drive car1.
create * part hair1.
create * wear suit1.
create * part eye1.
create * part eye2.


For more info, see www.xdb2.com/Example/ThingsNamedBrown.asp

Neo

unread,
Jul 27, 2004, 10:08:44 PM7/27/04
to
> > www.xdb2.com/Example/BoxProperties.asp shows a box whose thickness is 1 cm,
> > weighs 1 kg and costs 1 $. Each property references the same quantity 1.
>
> x wrote: I looked at your example and I have only seen three pictures that
> means nothing.

In general, when the tree shows:
thing
inst: box
inst: box1
thickness: 1cm
qty: 1
unit: cm
It means:
thing's instance is box.
box's instance is box1.
box1's thickness is 1cm.
1cm's qty is 1.
1cm's unit is cm....

>I have not seen the script you used to create the database.

Below is the script to create the db:

create *quantity cls thing. // *x => create a new thing and name it x.
create *1 cls quantity.

create *unit cls thing.
create *cm cls unit.
create *kg cls unit.
create *$ cls unit.

create *distance cls thing.
create *. // Create a new thing.
create * cls distance. // ' * ' refers last new thing created by '*.'
create * quantity 1.
create * unit cm.

create *mass cls thing.
create *.
create * cls mass.
create * quantity 1.
create * unit kg.

create *money cls thing.
create *.
create * cls money.
create * quantity 1.
create * unit $.

create *thickness cls relator.
create *weight cls relator.
create *cost cls relator.

create *box cls thing.
create *box1 cls box.
create box1 thickness (distance)((quantity)1)((unit)cm). // Rel expression
create box1 weight (mass)(1)(kg). // Simplified relational expression
create box1 cost (money)(1)($).


If someone could suggest a clearer syntax, I am open to suggestions.

x

unread,
Jul 28, 2004, 3:32:59 AM7/28/04
to
**** Post for FREE via your newsreader at post.usenet.com ****


"Neo" <neo5...@hotmail.com> wrote in message
news:4b45d3ad.04072...@posting.google.com...

When you insert 100 boxes with different quantities, you need to assert in
two different places that each number is a quantity AND a measure for some
box.
I suggest you change this.

Also I suggest you get rid of those parentheses.

robert

unread,
Jul 28, 2004, 12:28:36 PM7/28/04
to

ah, the revenge of prolog. a language that died as an
infant. 30 years ago.

Neo

unread,
Jul 28, 2004, 1:49:23 PM7/28/04
to
> > create *.
> > create * cls mass.
> > create * quantity 1.
> > create * unit kg.
> >
> > create box1 weight (mass)(1)(kg).

>
> When you insert 100 boxes with different quantities, you need to assert in
> two different places that each number is a quantity AND a measure for some
> box.

Are you in effect saying that a color needs to be "asserted" in two
different places each time a car is added to T_Car below (assuming
each car is a different color)? If so, what is the significance?

T_Color
Name
red

T_Car
Name Color
Corvette ->red

> Also I suggest you get rid of those parentheses

> [ie (distance)((quantity)1)((unit)cm)]

Doing so wouldn't indicate the same thing, just as (a)((b)c)((d)e)
doesn't equal (a)(b(c))(d(e)) or (a)(b)(c)(d)(e) or a b c d e, etc.
Each set of parentheses is approximately equal to a level of
indirection (similar to joins in RM) as shown below:

T_Color
Name
red

T_Car
Name Color
Corvette (red)

Removing parentheses would have about the same effect as removing them
from LISP.

Neo

unread,
Jul 28, 2004, 7:24:05 PM7/28/04
to
> x wrote: I wonder if you can do math with those quantities.
> For example could one ask for the total weight of all boxes.

In the example below, the quantities have been classified as integers.

/**************************************************
Create two boxes with thickness, weight and cost.
Loop thru boxes and sum their weights.
**************************************************/
void Example_BoxProperties()
{
// Create integer
NLI_create_r(_T("*integer cls thing"));

// Create quantity
NLI_create_r(_T("*quantity cls thing"));

// Create 1
NLI_create_r(_T("*"));
NLI_create_r(_T("* name '1'"));
NLI_create_r(_T("* cls quantity"));
NLI_create_r(_T("* cls integer"));

// Create 10
NLI_create_r(_T("*"));
NLI_create_r(_T("* name '10'"));
NLI_create_r(_T("* cls quantity"));
NLI_create_r(_T("* cls integer"));

// Create unit
NLI_create_r(_T("*unit cls thing"));
NLI_create_r(_T("*cm cls unit"));
NLI_create_r(_T("*kg cls unit"));
NLI_create_r(_T("*$ cls unit"));

// Create distance
NLI_create_r(_T("*distance cls thing"));

// Create 1 cm
NLI_create_r(_T("*"));
NLI_create_r(_T("* cls distance"));
NLI_create_r(_T("* quantity 1"));
NLI_create_r(_T("* unit cm"));

// Create mass
NLI_create_r(_T("*mass cls thing"));

// Create 1 kg
NLI_create_r(_T("*"));
NLI_create_r(_T("* cls mass"));
NLI_create_r(_T("* quantity 1"));
NLI_create_r(_T("* unit kg"));

// Create 10 kg
NLI_create_r(_T("*"));
NLI_create_r(_T("* cls mass"));
NLI_create_r(_T("* quantity 10"));
NLI_create_r(_T("* unit kg"));

// Create money
NLI_create_r(_T("*money cls thing"));

// Create 1 $
NLI_create_r(_T("*"));
NLI_create_r(_T("* cls money"));
NLI_create_r(_T("* quantity 1"));
NLI_create_r(_T("* unit $"));

// Create relators
NLI_create_r(_T("*thickness cls relator"));
NLI_create_r(_T("*weight cls relator"));
NLI_create_r(_T("*cost cls relator"));

// Create box
NLI_create_r(_T("*box cls thing"));

// Create box1
NLI_create_r(_T("*box1 cls box"));
NLI_create_r(_T("box1 thickness (distance)((quantity)1)((unit)cm)"));
NLI_create_r(_T("box1 weight (mass)(1)(kg)"));
NLI_create_r(_T("box1 cost (money)(1)($)"));

// Create box2
NLI_create_r(_T("*box2 cls box"));
NLI_create_r(_T("box2 thickness (distance)((quantity)1)((unit)cm)"));
NLI_create_r(_T("box2 weight (mass)(10)(kg)"));
NLI_create_r(_T("box2 cost (money)(1)($)"));

// Get ptr to things created above
// Note: one of several methods
int* pBox = Str_getDefT(_T("box"));
int* pQty = Str_getDefT(_T("quantity"));
int* pWeight = Str_getDefT(_T("weight"));
int* pInteger = Str_getDefT(_T("integer"));

// Loop thru box instances
int totalWeight = 0;
int* pE[32];
Expr_SVx_get_r(pBox, pReInst_g, pE);
while (int* pBoxX = X2(pE)){
// Get boxX's weight
int* pWeightX = S_SVx_1st(pBoxX, pWeight);
if (pWeightX){
// Get weightX's qty
int* pQtyX = S_SVx_1st(pWeightX, pQty);
if (pQtyX){
// If qtyX is an integer
if (S_SVO_1st(pQtyX, pReCls_g, pInteger)){
// Get qtyX's name as an ascii str
TCHAR sQtyX[kStrSz_g+1] = _T("");
T_Name_get(pQtyX, sQtyX, kStrSz_g);

// Convert ascii str to integer
int iQtyX = _ttoi(sQtyX);

// Sum weight
totalWeight = totalWeight + iQtyX;
}
}
}
}

// Print total weight of boxes (prints 11)
TRACE(_T("Total weight of boxes is: %d\n"), totalWeight);
}

x

unread,
Jul 29, 2004, 2:28:11 AM7/29/04
to
**** Post for FREE via your newsreader at post.usenet.com ****


"Neo" <neo5...@hotmail.com> wrote in message
news:4b45d3ad.04072...@posting.google.com...

> > > create *.
> > > create * cls mass.
> > > create * quantity 1.
> > > create * unit kg.
> > >
> > > create box1 weight (mass)(1)(kg).

> > When you insert 100 boxes with different quantities, you need to assert
in
> > two different places that each number is a quantity AND a measure for
some
> > box.

> Are you in effect saying that a color needs to be "asserted" in two
> different places each time a car is added to T_Car below (assuming
> each car is a different color)? If so, what is the significance?

I was talking about quantities example, not about colors.
I was talking about removing the need to assert that 1, 2, 3, are numbers
each time you assert a weight, a length, a cost or at least to assert this
in the same place, not in two different places.

> > Also I suggest you get rid of those parentheses
> > [ie (distance)((quantity)1)((unit)cm)]

> Doing so wouldn't indicate the same thing, just as (a)((b)c)((d)e)
> doesn't equal (a)(b(c))(d(e)) or (a)(b)(c)(d)(e) or a b c d e, etc.

> Removing parentheses would have about the same effect as removing them
> from LISP.

I don't suggest you to blindly remove the parentheses.
There are ways by you can at least reduce the number of parentheses.

x

unread,
Jul 29, 2004, 2:34:46 AM7/29/04
to
**** Post for FREE via your newsreader at post.usenet.com ****

Wonderful ! This is how the brain works.

"Neo" <neo5...@hotmail.com> wrote in message
news:4b45d3ad.04072...@posting.google.com...

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

0 new messages