Re: Demo: Modelling Cost of Travel Paths Between Towns
Date: 14 Nov 2004 17:23:23 -0800
Message-ID: <4b45d3ad.0411141723.6847ab83_at_posting.google.com>
> Sounds like your DB cannot do arithmetic like SQL:
That is true, TM/XDb2 does not have much to do with operations (except possibly intersecting things, which may the basis for all other operations). Currently TM/XDb2 does not know integers, floats, or how to add/subtract. These have to be provided by user's code just as that for other classes such as person, car, color, etc.
> update people set age=age+1 where name='john' ; Too bad.
While TM/XDb2 does not have built-in operations such as the above, user can easily create code that will update the age of any thing whose name is john and has an age, including that of things whose class is unknow at design-time (ie a person, dog, cat, pig, plane, etc in the future). Try coding that in RM.
> But it is annoying that you pose a toy example
> and then complain that the RM schema is a toy schema.
I call the provided RM schema a toy because it not normalized. XDb's solution is normalized down to symbols.
> Now your model seems at least as muddled as the RM solution. You cannot
> distinquish between the two towns named "a" with out strange contortions.
While town "c" can be distinguished from town "a" (even when town "c" is renamed to "a" based on what towns they goto) in XDb2's solution, this is impossible with Celko's solution because it isn't normalized.
> Now you are going to come back and say, something along the lines that c.name
> is different from a.name though they have the same values.
> Well then I would say Joe DID leave out an ID column in his model, and I
> would populate that with your object ID. In some databases, I wouldn't even
> have to do that, as it it possible to get a pseudo-column row ID value.
The more ideal the data model (and implemenation), the less a user will see IDs. Notice there are no IDs in XDb2's script. Try accomplishing the equivalent with RM script.
> I am losing any confidence of seeing advantages to your DB.
This is because you do not realize that the simple appearing XDb2 script produces a db normalized down to symbols, while those provided by RMers are far from.
> The syntax is awkward,
Recommendations welcomed.
> the model is hierarchical (ie, ancient),
The distinguishing characteristic of a hierarchal model is that a thing can only have one parent. Each thing in TM/XDb2 can have any number of relations (of any number of types) to any number of other things. Try implementing www.xdb2.com/example/ex113.asp with any data model you know. None are as flexible/generic as TM/XDb2. Received on Mon Nov 15 2004 - 02:23:23 CET
