Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Which normal form is this violating?

Re: Which normal form is this violating?

From: --CELKO-- <71062.1056_at_compuserve.com>
Date: 29 Apr 2002 15:35:40 -0700
Message-ID: <c0d87ec0.0204291435.2e5cd35e@posting.google.com>


>> Here's where I lost you, unless you're assuming that Table_B.fieldx
is NOT a foreign key. If it IS a foreign key (and I think it's reasonable to assume that's how they're thinking about it), then the above insert fails. <<

I am not sure that it is foreign key constraint .. people write pretty bad code these days, so I did not assume specs.

>> It seems to me like Table_A defines the domain of fieldx values,
and Table_B actually uses those values. <<

That would be MUCH better. What I would like to see is a CREATE DOMAIN statement (available in SQL-92) that makes this clear and works for all places that an attribute like "color" appears. The PK-FK approach is a work-around that gets abused really fast.

  1. The referenced table holds a small number of values that would fit nicely into a CHECK (x IN (...)) clause. I have actually seen referenced tables with as few as four rows.
  2. If I declare something have a color attribute, and I forget to "link" it to the look-up table, I think it has the right domain when it does not.
Received on Mon Apr 29 2002 - 17:35:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US