|
|
Terms of Agreement:
By using this article, you agree to the following terms...
1) You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame.
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description. | Choose database level constraints where possible. Integrity
constraints (foreign keys), check constraints (attribute domains)
take work out of the programmers head space. It stops data from
getting scrambled.
Any programmer who thinks about it will come to the same conclusion.
For example, great wads of code written to check that an orderline is
attached to an order becomes worthless if one error pops up anywhere or anytime in any application that touches the data.
It doesn't matter how good one programmer is if another idi0t gets
in there and scrambles the data. Maintenance on programs goes for
decades. And I never met a programmer that didn't think everyone
else is an idi0t.
ERP applications such as Baan, PeopleSoft and SAP end up costing
companies huge overhead to straighten out the "programmer enforced"
constraints.
It is one of the dirty secrets of ERP. Most of the processing that
happens in ERP batch jobs seems to be 'fixing' the problems
brought about by bad design, old code and non-RDBMS based
architecture which fails to use database level constraints.
The only place to use programmed constraints is where shared data
is treated differently in separate applications. In that case shared
constraints are still enforced by the database but application specific
constraints have to be handled per application.
For testimonials just ask people who "clean" data for
loading into a data warehouse which type of database they would
rather load from....
| |
Other 13 submission(s) by this author
|
|
|
Report Bad Submission |
|
|
Your Vote! |
See Voting Log |
|
Other User Comments |
9/26/2001 4:47:42 PM:AngryBuddha Nice explanation Steve.... I hope the
prgrammers are paying attention ;)
|
|
Add Your Feedback! |
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.
NOTICE: The author of this article has been kind enough to share it with you. If you have a criticism, please state it politely or it will be deleted.
For feedback not related to this particular article, please click here. |
|