| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: A foreign key on a self-referring table
"Andrea Laforgia" <alaforgia_at_despammed.com> wrote:
>Hi all and sorry for my English.
>
>I have a question about foreign-keys.
>
>In a project I'm currently working on, I looked at the database design
>chart (made by other people) and found that some tables have foreign
>keys referring to themselves.
>
>For example:
>
>Table Customers:
>|--------------------------|
>|CustomerID |(PK)
>|--------------------------|
>|Name |
>|City |
>|ZipCode |
>|CustomerID |(FK)
>----------------------------
>
>(That's an example, of course, it's not my real case).
>
>That's quite weird, in my opinion, but I wish to know whether it is
>acceptable, in general, or they are just violating some database
>design principle.
>
>....Thanks!...
>
>--
>Andrea Laforgia
>
>
It is acceptable. It's called a hierarchy.
Received on Thu Mar 04 2004 - 08:06:53 CST
![]() |
![]() |