Subject Re: [IB-Architect] Netfrastructure -- FKs not
Author Jim Starkey
At 10:28 AM 2/28/01 -0500, Craig Stuntz wrote:
>Jim wrote WRT Netfrastructure:
>> 9. Foreign key enforcement, not.
> Jim, would you mind adding a sentence or two to this? I'm curious about
>the costs and the benefits.

There are two problems associated with enforcing referential
integrity. The first is whether or not the system should
create an index on the foreign key. If the system guesses
wrong (and it has very little to go on), and either creates
an index with massive duplicates or fails to create an index
when appropriate, it has created a major bottleneck. Interbase
always creates an index for foreign keys and often suffers for

The second issue is that the nature of a professionally written
application, particularly a professionally written web application
that only presents users only valid choices, just doesn't lead to
referential integrity problems. Paying a major runtime cost
for problems easily detected during debugging doesn't strike
me as a good use of resources. One could argue that cost of
re-tracing the application's steps to validate referential
integrity is guarenteed to have 100% cache hits, but I still
wouldn't be impressed.

Jim Starkey