Re: Thoughs after discussions at OSCON

From: Chris Travers <chris(at)travelamericas(dot)com>
To: decibel(at)decibel(dot)org
Cc: elein <elein(at)varlena(dot)com>, Andrew Sullivan <ajs(at)crankycanuck(dot)ca>, pgsql-advocacy(at)postgresql(dot)org
Subject: Re: Thoughs after discussions at OSCON
Date: 2005-08-14 21:55:33
Message-ID: 42FFBDD5.60508@travelamericas.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy

Jim C. Nasby wrote:

>
>
>I think you're both correct; 90% of people who use databases don't
>understand how important maintaining the integrity of your data is. Tom
>Kyte (http://asktom.oracle.com/) harps on this all the time, and there's
>some articles in that website that provide some good explanations on why
>you want as much business logic, etc as possible in the database and not
>in some app server.
>
>
Part of the problem is that you have a lot of people with different
variations of the same opinions, but taking them in different
directions. Getting this information to developers is hard because
there is a lot of disagreement about how much logic one should put in
the database.

Personally I have never bought the "Put as much logic into your database
as possible." This can *easily* be taken way too far. Review the
discussions on pgsql-general about why sending email from the database
backend is a bad idea. Can you write a CRM application server in
PLPGSQL? Sure. But I am not sure it is a good idea.....

What I do is set up a system with the following layers:

User Interface
UI logic

Business Process Logic
Database Access/Abstraction

Data Presentation
Data Maintenance
Data Storage

The lowest of the three layers should be implimented within the database
itself. The top four layers are outside the database.

Database Abstraction is simply the idea that if nothing else all your
database calls should go through a single module so that if you need to
change it later, you can. This also facilitates the development of
3-tier systems and helps people decide *intelligently* what logic to put
in the database.

The fact of the matter is, your data integrity should be defined
independently of your application and the structure of the database
should enforce that integrity itself. The ideal database is
self-enforcing, self-describing, and allows for information presentation
to be independent from storage.

Besr WIshes,
Chris Travers
Metatron Technology Consulting

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Ned Lilly 2005-08-14 23:51:39 Re: Thoughs after discussions at OSCON
Previous Message Jim C. Nasby 2005-08-14 19:05:05 Re: Ok, I know, no slagging the other folks. But. . .