Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: RI - pros and cons
"Galen Boyer" <galenboyer_at_hotpop.com> wrote in message
news:ubsdhayyg.fsf_at_rcn.com...
> On Fri, 22 Mar 2002, dons_at_bimtech.com.au wrote:
> > A major drawback of using RI is that it tends to make your application
> > database vendor specific.
>
> How is this? It is completely transparent to the application.
No it isn't transparent to the app. Databases implement RI with differing
levels of functionality.
What you are saying is that you can develop an application and the way the
database interacts with your app will be the same regardless of the brand.
At the very least you would need to deal with different return codes and
errors as in most cases, different databases behave quite differently when
RI rules are broken.
>
> > If you intend building apps that will be used by different brands of
> > databases I'd say putting the RI in your app is a good thing.
>
> Once again. How is this?
Because you can cater for the RI deficiencies in poor databases, deal with
differences in how the various vendor's API return RI errors, handle RI
accross brands, etc....
>
> > Another reason for not using RI is that RI is designed to stop people
> > who aren't experts from doing stupid things.
>
> Wrong. It is designed to protect the data. All people of all levels do
> "stupid" things.
Agreed that programmers do get things wrong but my point was that they do
however have the opportunity to test things before they deploy their code so
the applications they build don't do stupid things.After testing the
application should be stable enough not to corrupt the data. RI is only
really needed because there are so many tools available to users that can
access the application's data and not be governed by an application's
business rules . And if you still disagree that RI can't be left up to the
programmer, who puts the RI constraints on the database in the first place ?
Isn't there just as much margin for error here ?
>
> > Quite often there are very good reasons for circumventing RI in the
> > application (particularly during data conversion projects or providing
> > data importing facilities). For conversions I guess you could just
> > drop the constraints, do the conversion and then put them back on.
>
> Yes. This is a reason for disabling them. But you still should
> reenable them after you are done. Of course, that is a whole other can
> of worms cause Oracle drops the indexes that are used to support the RI
> constraints. What are the correct storage clauses of the recreated
> indexes?
>
> --
> Galen deForest Boyer
> Sweet dreams and flying machines in pieces on the ground.
Received on Thu Mar 21 2002 - 23:50:53 CST