Re: In an standalone app'., where should the business logic reside?

  • From: Andrew Kerber <andrew.kerber@xxxxxxxxx>
  • To: Richard.Goulet@xxxxxxxxxxx
  • Date: Mon, 8 Nov 2010 09:32:14 -0600

One drawback of keeping the business logic in the database (especially when
using triggers), can be the case of legacy data.  Often the legacy data has
pieces missing, and when the time comes that legacy data needs to be updated
in some way, those triggers fail and you are scrambling to fix the problem.
Stored procedures often have similar problems.

Also, one of the jobs of the DBA is often to run scripts to fix up data, and
those business rule triggers and procedures are more likely to get in the
way when you are trying to fix problems.  So all in all, I prefer that the
business rules be handled by the application.  But, as with most things
Oracle, it really depends on the application and data more than anything
else.

On Mon, Nov 8, 2010 at 8:56 AM, Goulet, Richard
<Richard.Goulet@xxxxxxxxxxx>wrote:

>  Should a "standalone" app have it;s business login in the database??
> Good question, and the answer as in many cases is "it depends".  It depends
> on what the distance from the database server to the client is, stored
> procedures will execute faster inside the database if they need to access
> other data.  It depends on if there is more than one way to extract or
> insert data into the database, stored procedures will make sure that it's
> always done the same way no matter how it gets there.  It depends on if this
> app could branch out into other pieces, again stored procedures make sure
> that access is the same.  Lastly it depends on how often the logic is going
> to change, stored procedures are easier to change and test than a whole
> application.
>
>     So you see it really does depend.
>
>
> Dick Goulet
> Senior Oracle DBA
>
>
>  ------------------------------
> *From:* oracle-l-bounce@xxxxxxxxxxxxx [mailto:
> oracle-l-bounce@xxxxxxxxxxxxx] *On Behalf Of *RP Khare
> *Sent:* Monday, November 08, 2010 8:52 AM
> *To:* oracle-l@xxxxxxxxxxxxx
> *Subject:* In an standalone app'., where should the business logic reside?
>
> Hi,
>
>
> I read Tom Kyte's "Effective Oracle by Design". There he says to write most
> of the code in the DB itself to reduce application code. It is good in a
> distributed environment, but is it advantageous in an standalone application
> also?
>
> My app. is in .NET.
>
>
>
> ................
> Rohit.
>



-- 
Andrew W. Kerber

'If at first you dont succeed, dont take up skydiving.'

Other related posts: