|
Got constraints? ERP does not.
|
Email
|
| Submitted on: |
7/11/2000 11:08:28 PM |
| By: |
Steven Hauser
|
| Level: |
Beginner |
| User Rating: |
By 2 Users |
| Compatibility: |
SQL Server 7.0, Informix
, Oracle, Other |
| Views: |
11132 |
|
|
|
|
|
The question of database level enforced constraints vs programmer applied constraints is asked occasionally by people who have not done much database development work.
|
| |
Terms of Agreement:
By using this article, you agree to the following terms...
- 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.
- 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.
- You may link to this article from another website, but ONLY if it is not wrapped in a frame.
- 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
|
| |
Other User Comments
|
9/26/2001 4:47:42 PM: AngryBuddha
Nice explanation Steve.... I hope the prgrammers are paying attention ;) (If this comment was disrespectful, please report it.)
|
Add Your Feedback
Your feedback will be posted below and an email sent to
the author. Please remember that the author was kind enough to
share this with you, so any criticisms must be stated politely, or they
will be deleted. (For feedback not related to this particular article, please
click here instead.)
To post feedback, first please login.
|