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: about primary key

Re: about primary key

From: Grinberg L. <leon_at_grant.kharkov.ua>
Date: Tue, 27 Oct 1998 10:06:47 +0200
Message-ID: <713ush$mch@grant.grant.UUCP>

Phil Bradley wrote in message <36347F79.AD37E937_at_pacific.net.sg>...
>...
>Whilst there is nothing stopping you having a primary key, which is also a
>foreign key, e.g.
>
>Table EmployeeStuff(EmpNo, ........)
>Table MoreEmployeeStuff(EmpNo, ....)
>
>where EmpNo is both primary key of MoreEmployeeStuff and a foreign key to
>EmployeeStuff. It always represents either bad database design,
>optimisation, or a way of getting around an SQL limitation as in an example
>posted in this thread, where it gets around the fact SQL does not
explicitly
>support sub-types.

You are right, but IMHO constraint UNIQUE (+ NOT NULL) does the same, but is more clear and is more compatible with good design. Received on Tue Oct 27 1998 - 02:06:47 CST

Original text of this message

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