Re: Business-logic in 3-tier architecture

From: Tobin Harris <comedyharris_at_hotmail.com>
Date: Fri, 11 Oct 2002 01:40:45 +0100
Message-ID: <ao563u$j4fbm$1_at_ID-135366.news.dfncis.de>


"Arthur Yeo" <ayeo_at_acm.org> wrote in message news:I73p9.29456$7I6.92391_at_rwcrnsc52.ops.asp.att.net...
> 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
>
>
>
Received on Fri Oct 11 2002 - 02:40:45 CEST

Original text of this message