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

Home -> Community -> Usenet -> c.d.o.misc -> Re: not using foreign keys?

Re: not using foreign keys?

From: William Robertson <williamr2019_at_googlemail.com>
Date: Fri, 08 Jun 2007 01:23:35 -0700
Message-ID: <1181291015.114224.266320@h2g2000hsg.googlegroups.com>


On Jun 5, 5:24 pm, y..._at_vtn1.victoria.tc.ca (Malcolm Dew-Jones) wrote:
> spacemar..._at_mailinator.com wrote:
>
> : hello,
>
> : i have a question -- is the practice of using FKs to maintain
> : referential integrity an argued (for/against) practice?
>
> In addition to anything else, FK's and other constraints are an excellent
> way to document the rules and relationships of the system.
>
> Much easier to read and understand than the code that interacts with a
> user.

Agreed, the self-documentation aspect (and the ability to use tools that can read constraints and present users with related look-up queries, ERDs etc) surely makes it easier to bring new developers and analysts up to speed, saving the business time and money and reducing mistakes.

Also worth mentioning is the fact that the optimizer can make use of constraints in certain query transformations, and so constraints can potentially improve query performance. I think Jonathan Lewis has written about this. Received on Fri Jun 08 2007 - 03:23:35 CDT

Original text of this message

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