Originally posted by chrisrlong
EVERYTHING in the database is the implementation of a business rule. Now, the database should strive to be larger and more generic than the application that it is first written with, because databases live longer than mere applications.
. . . db's can even out-live the business (or at least the type of business that defined the rules). The question is: if you enforce the rules like this, how easily can you change them? Luckily ALTER TABLE exists . . .
Short war story - Pharma industry 1980's:
Unit prices were typically $10 - but could be billed in foreign currency and prices do rise - so max unit price was set at 999'999.99 Fine, until we moved into counter-trade and sold a single piece of machinery for several billions of Italian Lira.
"The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman