Re: Demo: Modelling Cost of Travel Paths Between Towns

From: Neo <neo55592_at_hotmail.com>
Date: 16 Nov 2004 21:00:30 -0800
Message-ID: <4b45d3ad.0411162100.58dedf09_at_posting.google.com>


Neo: 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 unknown at design-time (ie a person, dog, cat, pig, 
     plane, gizmo, widget, etc in the future). Try coding that in RM.

Alan: I really think you have no clue at all.

Neo: So let's step thru it and fill in the details:

 08:45 - Alan creates table "your_table"

         Please show your db's schema 
         and in particular your_table's fields here.
         Note: At this time you do not know 
         what type of things Neo will added at 11.
 09:00 - Alan writes following query:
         UPDATE your_table SET age = age + 1
         WHERE name = 'john' AND age IS NOT NULL;
         Note: A query that finds all things with age 
          and name john is sufficient to illustrate point.
          The query should not mention NULL anywhere. Why?
          Because you db shouldn't have NULLs to begin with.
          Don't forget to anticipate things without names
          or multiple names. In fact, don't forget to 
          anticipate the unanticipatable.
 10:00 - Neo will adds some thing.
         I will tell you AFTER you have finished you db's schema.
         You can bet I will add something your db schema 
         didn't anticipate at 8:45.
         If necessary, we will modify your db's schema 
         to represent the new things w/o NULLs or redundancy 

(I'll let redundant symbols slide).
11:00 - I run your query that you created at 9:00. I assert your query will most likely fail
(unless you use generic modelling, similar to what
Hugo had implemented for Common Ancestor Report, only moooooore generic)

Under above type of conditions, XDb2's (SELECT %.age & %.name=john;) will be valid not matter what is added or how the "schema" is modified in the future. Received on Wed Nov 17 2004 - 06:00:30 CET

Original text of this message