Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: not using foreign keys?
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
![]() |
![]() |