[linux-elitists] (from Pigdog) Feuerstein on Oracle

Mr.Bad mr.bad@pigdog.org
Mon Oct 23 18:56:04 PDT 2000

>>>>> "PJC" == Paul J Collins <sneakums@sto-kerrig.org> writes:

    PJC> [...] Then it is not 1NF, since the fact of a location's name
    PJC> is duplicated all over the place.

Silly, silly boy. Don't you know that meaningful keys, like a
location's name, are the best kind? Dumbbunnies think that using a
numerical key gives you some kind of performance improvement over
using string keys -- this is patently false for most RDBMSs. (Before
anybody comes sputtering that this isn't true, please try it.) It's
not even "more relational" -- it's generally considered bad RDBMS
design to throw in meaningless data into your schema.

Now, if the table was like THIS:

        Person          Country         Population
        Bad             USA             250 Million
        PJC             Ireland         20 Million
        Nick            USA             250 Million

Then OF COURSE it would be better to separate the country out to a
separate table, which contains the country's name and population. And
then you can use the name of the country as a key.  But your example
sucked. Artificial numerical keys generally suck. You mistake "key"
for "pointer," grasshopper, and you show yourself an RDBMS novice.

I have no respect whatsoever for your knowledge of database
theory. Consider yourself smacked with a zenbo and go to the back of
the class. I could care less what an uninformed tenderfoot has to say
about object databases.

BUT, by the way, I would design the classes so that they looked like

        class Country
                attribute name (string)
                attribute population (integer)

        class Person
                attribute name (string)
                attribute country (reference to Country)

It would of course be up to the OODBMS system to take that country
reference and know where and how to save or update it. I fail to see
how the data is replicated anywhere.

If the classes looked like this (my example from before):

        class Country
                attribute name (string)
                attribute population (integer)
                attribute people (list of reference to Person)

        class Person
                attribute name (string)
                attribute country (reference to Country)

THEN you're storing the same fact (that Person "Bad" lives in Country
"USA") twice -- once with the Country, once with the Person. If you
edit and save one of these two classes, only application code or
extra-super magic could update the other one, too. But, like I said,
you don't have to do that.

    PJC> I don't believe that OODBMSes are a valid way to store and
    PJC> manipulate data.  Not that I can back this opinion up, of
    PJC> course.

Yeah, I think you're just being an obstinate knucklehead.

~Mr. Bad

 /\____/\   Mr. Bad <mr.bad@pigdog.org>
 \      /   Pigdog Journal | http://pigdog.org/ | *Stay*Real*Bad*
 |  (X \x)   
 (    ((**) "If it's not bad, don't do it.
  \  <vvv>   If it's not crazy, don't say it."

More information about the linux-elitists mailing list