Re: Enforcing Referential Integrity: Pros vs. Cons?
Date: Tue, 9 Nov 2004 07:31:32 -0500
Message-ID: <tKCdnWHRl483JQ3cRVn-3Q_at_comcast.com>
"Richard Hollenbeck" <richard.hollenbeck_at_verizon.net> wrote in message
news:lJYjd.550$2h7.87_at_trnddc03...
> I'm not an ABSOLUTE newbie, but probably a relative newbie compared to
many
> in this group. I've been programming in Access using VBA with DAO. Ever
> since I began, I thought it would ALWAYS been better to enforce
referential
> integrity with cascading deletes and cascading updates to keep data
> synchronized among related tables. My thoughts were influenced by the
idea
> that if a database were properly normalized, there should not be a reason
> why I shouldn't enforce this referential integrity. Am I correct or not?
> Are there any reasons why I would not? I'm assuming there is a reason
> because Access provides the option to enforce or not enforce. What are
some
> very valid reasons why one would choose to not enforce? Is not enforcing
> just a cheap way to get around a poorly normalized database?
I started another thread about declaring unenforced constraints. I learned that those features are already in the major SQLRDBMSes.
Some people made the counter observation that unenforced constraints didn't save all that much time when compared to cleaning up the data before writing. There's a lot of truth in that, especially when it comes to RI. Everybody that chooses not to enforce constraints says that they do so for performance reasons. Sometimes they just don't care about the consequences of bad data. Sometimes they really are writing only good data to the database.
But abhorrence to DBMS declared constraints almost always betrays what I'll call the "process centered world view" as opposed to the "data centered world view". I changed from the former to the latter when I became a database guy after 20 years of programming.
That's one of the reasons I want unenforced constraints. It changes the politics of getting constraints into the DBMS in the first place. But that's a long topic, in and of itself. Received on Tue Nov 09 2004 - 13:31:32 CET
