Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: about primary key
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
![]() |
![]() |