Re: Demo: Modelling Cost of Travel Paths Between Towns

From: Alan <not.me_at_uhuh.rcn.com>
Date: Sun, 21 Nov 2004 20:58:08 GMT
Message-ID: <Aj7od.4797$hJ6.2683_at_trndny01>


"Neo" <neo55592_at_hotmail.com> wrote in message news:4b45d3ad.0411211042.1ad555f1_at_posting.google.com...
> Alan: The second Martian has yet to be introduced into the scenario,
> but let's introduce him now. We don't know this Martian's name either,
> so he is called Neosense2. Why you would assume the next one would
> also be assigned Neosense1 is beyond sensible thinking., and
> demonstrates that you have no idea how the relational model works.
>
> Neo: Can I assume from above that each new martian without a name
> would be named "Neosense#" where # is incremented each time.

Yes.

And that
> "Neosense#" is known by system user and programmer to mean unknown,
> thus
>
> If ( martian.name == "Neosense1"
> OR martian.name == "Neosense2"
> OR ...){
> // martian.name is unknown
> }
>
> What does RMDM do when he meets a martian whose actual name is
> "Neosense1" or even "unknown"?

There are several ways to handle this scenario. First, I would have researched the issue before deciding on my naming convention, so it is likely that this would not occur in the first place. Even if it does, there are several ways to handle it. Again, this kind of thing happens all the time, but the relational model is robust enough to handle these things. The designer would choose the best solution for the situation. Possibilities include updating the exiting Neosense1 to another value and cascading it through any "child" tables, or, adding a "real_name" column to the existing TEST table. Both of these would work. There are pros and cons to each, and probably some other possibilities.

>
> > > Alan: INSERT INTO test VALUES(whatever they are, but name='Neotest1',
> > > age='-1')
> > >
> > > Neo: Which RM Db handles "whatever they are"?
> >
> > "Whatever they are" is just shorthand instead of typing out the various
> > values.
>
> And the various values are? I am asking because I want to know your
> initial RM schema and query.

So you can change the rules again? I feel no need to provide you with the obvious. If you wish to continue to challenge the RM and SQL, I suggest you learn it. I am certain no one else here is puzzled by what the values would be. Received on Sun Nov 21 2004 - 21:58:08 CET

Original text of this message