Re: Myth of the database independent applications (Was: Are you using PL/SQL)

On May 27, 9:38 am, "Jonathan Lewis" <jonat..._at_jlcomp.demon.co.uk>
wrote:
> <zigzag..._at_yahoo.com> wrote in message>> news:1180257868.590456.84400_at_q69g2000hsb.googlegroups.com...>>>> > Three tier architecture is "standard" as well as good architecture> > because it separates UI, Buisness Logic and database. UI only does UI,> > database only stores data and busines slogic does the rest.>> I've always been fascinated by the concept of business logic> being totally divorced from data correctness.

Yes, it is fascinating. At least some of the issue arises from the
impossibility of completely describing the business logic in a
short period of time.

>> Either the data is a correct description of the state of> the business, or it is not - which means the "business> logic" is inherent in the data and enforced by the> constraints on the data.

Well, that's the "programmer's mistake." It will never be a 100%
correct description in many dynamic environments. For
example, there may be a variety of deals describing the sales
of a product to a customer, the attributes may change based
on the instincts of a salesperson in the field. Then the system
design is at least a step behind. To describe such attributes
within the database means having to be able to modify a large number
of constraints on a large amount of data in zero time. Not
to mention the analysis. And if you just ask management,
they are likely to say an attribute is "no sale will _ever_ be
below cost," until someone decides it's better to sell off the
old crap than pay for extra storage space or someone to
cart it away.

Some things are just better left to hacking.

>> You may choose to have as many layers of code as> you like to transform the data from one valid state to> another valid state; but if you rely on programs to> maintain data correctness, you don't have a database,> you have a bit-bucket.>> Three-tier is not an ideal to be aimed for, it is crutch to> be used as sparingly as possible until the database technology> is good enough to walk unaided.>