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: SQL for Modeling Generalization Hierarchies

Re: SQL for Modeling Generalization Hierarchies

From: Joel Garry <joel-garry_at_home.com>
Date: 2 Jun 2004 15:51:24 -0700
Message-ID: <91884734.0406021451.2450feec@posting.google.com>


daaa_at_rock.com (DaaaDaaa) wrote in message news:<2193afb.0406011916.5abb2052_at_posting.google.com>...

>
> Good stuff, for one thing I don't get it,
> Why would one need NOT NULL in the following DDL,
> > CREATE TABLE Sedans
> > (vin CHAR(17) NOT NULL PRIMARY KEY,
> > vehicle_type CHAR(3) DEFAULT 'SED' NOT NULL
> > CHECK(vehicle_type IN ('2DR', '4DR', 'SED')),
> > UNIQUE (vin, vehicle_type),
> > FOREIGN KEY (vin, vehicle_type)
> > REFERENCES Vehicles(vin, vehicle_type)
> > ON UPDATE CASCADE
> > ON DELETE CASCADE,
> > ..);

Methinks he means theoretically the primary key could be separate from the vin definition. Just because Oracle disallows it doesn't mean it is redundant. I don't know about ANSI or other db's offhand.

> since by definition PRIMARY KEY cannot be null, so, why would I tell
> people, "I'm an American and an American citizen", instead of just
> say, "I'm an American"?

'Cause you are not these guys:
http://www.signonsandiego.com/news/metro/20040511-9999-1m11deport.html http://www.signonsandiego.com/uniontrib/20040529/news_1n29deport.html

Obviously, the attributes of American are cultural, and of a citizen are legal. A citizen could be raised abroad and not consider themselves American, and it is possible to have null citizenship. http://www.keepmedia.com/ShowItemDetails.do?itemID=326142&extID=10032&oliID=213 http://www.hrw.org/reports/1995/Kuwait.htm

jg

--
@home.com is bogus.
Happy Birthday, Jerry Mathers.
Received on Wed Jun 02 2004 - 17:51:24 CDT

Original text of this message

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