Skip site navigation (1) Skip section navigation (2)

Re: Big Picture

From: "Jules Alberts" <jules(dot)alberts(at)arbodienst-limburg(dot)nl>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Big Picture
Date: 2002-10-22 10:08:21
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On 22 Oct 2002 at 5:51, Erik Price wrote:
> Is "putting as much of your application logic into SQL" the preferred 
> way to develop DB-driven applications?

What exactly do you mean with a "DB-driven" app?

About the logic, my two cents... There are different views towards this 
nowadays. I guess most common is the advice to not put your business 
logic in the frontend. But where? You can put it in the db itself or 
put it in another layer. This is commonly known as the multi-tier 
model, you should be able to Google a lot about it.

Personally I prefer the approach with as much logic as possible in the 
database or at least on the server, and a client that is as thin as 
possible. Maybe it's because I've worked with a db without any 
constraints etc (lots of .dbf files) which forced me to write a huge 

I think whether you would want a (thin) client-server or a multi-tier 
model would depend on the need to change your database. If your 
business logic is in the db and your company would change from 
postgresql to oracle (or whatever), you have a big problem. With logic 
in the middle layer that problem would be a lot smaller. With this in 
mind, also think about using PostgreSQL and PHP with adodb to 
"translate" your db-specific commands. I haven't used adodb much, but 
last time I looked, changing from one DBMS involved only a few changes 
in your PHP code.

In response to


pgsql-novice by date

Next:From: paul butlerDate: 2002-10-22 10:33:48
Subject: Re: Big Picture
Previous:From: Erik PriceDate: 2002-10-22 09:51:42
Subject: Re: Big Picture

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group