Re: Demo: Modelling Cost of Travel Paths Between Towns

From: Neo <neo55592_at_hotmail.com>
Date: 8 Nov 2004 12:20:35 -0800
Message-ID: <4b45d3ad.0411081220.701460b6_at_posting.google.com>


> Alan wrote:
> Neo has stored the word "monday" 4 times.
> Neo has stored letters a, b, c, d more times than I care to count.
> Therefore, Neo is practicing redundancy.

I do not assert the script to create the db does not have redundant things. I do assert that there are no redundant things in the db including the word "monday" and the symbols a, b, c, d. Example www.xdb2.com/Example/BoxProperties.asp demonstrates this ability by displaying the ID of symbol 1 and the quantity 1. I am surprised you didn't understand this as it was discussed and demonstrated at great length in the recent comp.database.theory thread titled "A Normalization Question" to which you were a significant contributor. Would you like to reverify step-by-step that there is only one word "monday" in the db?

> Neo has stored program code as data.

Could you specify the program code that Neo stored as data. It appears you are against storing program code as data. Could you first define the fundamental difference between code and data. Could you then indicate why you are against storing "code" as data. Are you asserting that by storing the same things in a relational db, there would be no storing of program code as data?

> Neo is practicing Object Orientation.

Could you please define what is an "object" and "object-orientation". In RM, tables, row, columns, values can be thought of as objects. Are you asserting that in the tools that you use, you are not practicing some level of object-orientation?

> What happens when trip goes to 64 towns in three months,
> visiting some towns more than once?
> Answer: Neo has stored big headache and carpal tunnel syndrome.

Why don't we find out for sure. Would you be willing to model 64 towns with various paths, cost factors and valid durations in a week; and then query/code solutions to some typical problems to guage each methods advantages/disadvantages? You may use RM or any other tool that you prefer.

> Here is some SQL for Neo to learn:
> INSERT INTO neo VALUES 'common sense', 'integrity', 'honesty';
> UPDATE neo SET pocketbook = pocketbook - 1000;

Please teach Neo the common sense meaning of integrity and honesty by showing that Hugo's RM Solution #1 and #2 aren't nearly twice as slow as XDb1's even when XDb1 is executed on a 5.6X slower machine. See measurements below. You are weclome to download XDb1 (see www.xdb1/example/ex076.asp) and verify it against Hugo's solutions.

Not only are Hugo's solutions slower, but they are not as generic or normalized. For instance, Hugo's solution cannot represent the following cases without NULLs or redundant data (XDb1's solution is normalized down to atomic symbols):

Case1: God is the parent of an unnamed person. God is also the parent of second person with three names (string 'john', integer 100, decimal 3.14).

Case2: john isa person. john's color is brown. mary isa person. mary's color is brown. brown is a person.  

As shown by the measurements made below, even when executed on a 5.6 times slower 233 Mhz Pocket PC, XDb1 generated the small common ancestor report nearly twice as fast as Hugo's non-normalized, non-generic SQL Server 2000 Solution running on a 1,300 MHz desktop.

Small Report Generation Summary (provided by Hugo)



Solution Time(ms) Platform Notes
-------------- --------  ----------------- --------------------------
RM#1 SqlSrvr2K  14.3     1.3 Ghz PC        Unnormalized, non-generic
RM#2 SqlSrvr2K  11.0     1.3 Ghz PC        Unnormalized, non-generic


Small Report Generation Summary (provided by Neo)



Solution Time(ms) Platform Notes
-------------  --------  ----------------- --------------------------
RM#1 SqlSrvr7   65.0     500 Mhz Server    Unnormalized, non-generic
RM#2 SqlSrvr7   68.9     500 Mhz Server    Unnormalized, non-generic
XDb1 4.5.7       1.632   500 Mhz Server    Normalized, generic
XDb1 4.5.9       6.561   233 MHz PocketPC  Normalized, generic


Large Report (28,940 rows) Generation Summary (provided by Neo) 200 Goat Hierarchy (5 generations x 40 goats/generation, each goat having two parents, except 1st gen).



Solution Time(sec) Platform Notes
-------------  --------  ----------------- --------------------------
RM#5 SqlSrvr7   40.5     500 Mhz Server    Unnormalized, non-generic
XDb1 4.5.7       2.9     500 Mhz Server    Normalized, generic
XDb1 4.5.9      16.971   233 Mhz PocketPC  Normalized, generic


Larger Report (276,620 rows) Generation Summary (provided by Neo). 400 Goat Hierarchy (10 gen x 40 goats/gen),



Solution Time(ms) Platform Notes
-------------  --------  ----------------- --------------------------
RM#5 SqlSrvr7  105 min   500 Mhz Srvr, NT  Avg of 2 runs, UnNrm,UnGen
XDb1 4.5.10     44 min   500 Mhz Srvr, NT  Avg of 2 runs, Norm, gener
XDb1 4.5.10     57 min   450 Mhz PC, 98    1 run, Normalized, generic
XDb1 4.5.10 195 min 233 Mhz PocketPC 1 run, Normalized, generic Received on Mon Nov 08 2004 - 21:20:35 CET

Original text of this message