Re: Constraints
Posted in 1996
On Apr 29, 3:50pm, Peter Wages wrote: > Subject: Constraints > Having an argument with our DBA . OK discussion. We are in a > development effort. The DBA has put constrainsts on all the tables including > code tables. Wouldn't it have been better to wait until the development had > been done before installing the constraints? They seem to be more of a > hinderance than a help. I'm finding it hard to see their value. > > What do people think? Thanks. > Constraints are often more important during development than in production. The earlier you catch a bug that causes a data integrity failure on the database the cheaper it is to fix it. If you wait until you finish development before switching them on you will find yourself doing a whole bunch of bug fixing and regression testing that shouldn't have been necessary. Plus at this stage changing the way a complete transaction works can seriously impact your whole application. You practically admit that you want to let the developers write buggy code which they or you will have to fix later. Do it right, do it once would be a much better motto to live by. It also makes for a much easier life in the long run. Hiding a projects problems under the carpet will come back to haunt you. I like to do the opposite and review which constraints can be removed when you go into production. This can improve performance, sometimes significantly. As long as your testing cycles were comprehensive and you can restrict update access to the database to these tested and trusted applications then the need to enforce all constraints in production can be reduced. Cheers - Jim -- ----------------------------------------------------------------------------- Jim Gordon DHL Airways Inc. jgordon@us.dhl.com ----------------------------------------------------------------------------- My opinions are my own. They may vary with time but they remain mine!