Re: Should I use database foreign keys and indexes

From: JRStern <JXSternChangeX2R_at_gte.net>
Date: Tue, 16 Jul 2002 15:04:20 GMT
Message-ID: <3d3435b8.2966365_at_news.verizon.net>


On 16 Jul 2002 06:04:55 -0700, carl.stottlemyer_at_lmco.com (Carl) wrote:
>Thanks for all of your input. I am going to present to the group
>today why they should use idexes as a primary key and have foreign key
>constraints. Most of the opposition for foreign key constraints seem
>to think it is a hassle to turn them on and off when you are doing
>mass updates and/or need to repair the database. Personally I think
>that if you are doing mass imports or need to repair the database that
>is when you need them the most because you don't have any control over
>the integrity of the data being imported and during repairs you have
>the greatest potential to break something else.

Yes, I used to believe you could do development against a partial data model, ... but I gave that up a long time ago as a bad idea. Develop the full model and develop against it as early as possible.

For gigabyte database loads, you probably do need to zap indices and rebuild them, but, like, just DO it, it's part of the job!

As to "repairing" the database, indexes and DRI will prevent 90% of those problems in the first place, that's what they're there for!!!

Joshua Stern Received on Tue Jul 16 2002 - 17:04:20 CEST

Original text of this message