Re: Business-logic in 3-tier architecture

From: Anton Versteeg <anton_versteeg_at_nll.ibmm.comm>
Date: Fri, 11 Oct 2002 10:05:44 +0200
Message-ID: <3DA68658.33D6D5D8_at_nll.ibmm.comm>

It will be hard to give a general answer to these questions. There are many criteria that might influence the answer like:

  • performance. (where is the bottleneck? database server or elsewhere)
  • ease of administration (are the rules changing often?)
  • data integrity (what to do with data that was inserted via old rules?)
  • useability (where can the most clear error message be given? at what time can errors be detected?)

Tobin Harris wrote:

> "Arthur Yeo" <> wrote in message
> news:I73p9.29456$
> > Theoretically, everyone knows that business logic is supposed to be in the
> > middle-tier according to the 3-tier architecture. This seems to be
> > counter-intuitive to Active Database concepts such as putting business
> logic
> > in triggers with help from store procedures in the DBMS (which are all in
> > the 3rd-tier of the 3-tier architecture.)
> >
> > Question: do you guys know of any guidelines (or may be even stds)
> proposed
> > to decide when certain business logic is better put in the backend (DB
> > triggers/stored procedures)?
> This is a question I ponder myself - where do you draw the line!? One
> definate guideline is that database should be responsible ensuring bad data
> doesn't get in, and that integrety is honoured. However, I know of no clear
> line between the databases responsibilities and the midle-tiers
> responsibilities. If anyone can answer the following I'd be grateful (sorry
> to answer a question with a question, but it's an interesting one!)
> Should the database enforce that orders placed by Japanese customers are
> exempt from vat? Should the database enforce that orders can't be taken on
> a sunday? Should the database decide to send a letter out when a user is
> overdue on their payment?
> As databases embody full languages ( java rather than pl/sql), this line may
> become more fuzzy - we will have the choice of putting business logic
> anywhere, but where is best?
> Tobin
> > Cheers,
> > Arthur
> >
> >
> >

Anton Versteeg
DB2 Specialist
IBM Netherlands
Received on Fri Oct 11 2002 - 10:05:44 CEST

Original text of this message