Re: implement a referential integrity constraint (long)

From: Walter Mitty <wamitty_at_verizon.net>
Date: Wed, 13 May 2009 19:30:14 GMT
Message-ID: <adFOl.869$wR5.87_at_nwrddc02.gnilink.net>


"xyzzy" <google_at_m-streeter.demon.co.uk> wrote in message news:03e7e71a-9cd4-4361-be45-a12c4e568ddb_at_v1g2000prd.googlegroups.com...

>>

Love it or hate it, the information is stored in that structure. My question is, GIVEN the existing structure, what is the best way to put some referential integrity in? Walking away is not an option, so I want to make the best job of it instead.

<<

I hate to suggest this, but can you implement referential integrity constraints in the application(s) that update(s) the database? I suspect that if the database is as locked in as you say, then the application is locked in as well. But maybe not.

The reason I hate to make such a suggestion is that in years gone by, there have been any number of programmers who have visited c.d.t. and from time to time they have offered variations on the same programming philosophy. Roughly stated that philosophy comes down to treating the DBMS and the database as a stupid storage and retrieval engine, and doing anything requiring business rules knowledge in the application and not in the database. It's all that the regulars in here can do to explain, over and over again, why the data integrity features of a DBMS can be a good thing, and preferable, in many instances to relying on error free application code. This suggestion of mine is likely to set that debate back by years.

However, when I recommend this to you, xyzzy, I think you will treat my suggestion with the caveat it deserves. BTW, I'm sorry you're stuck in a database that resembles a bunch of twisty little passages, all different. Received on Wed May 13 2009 - 21:30:14 CEST

Original text of this message