| From: | "Josh Berkus" <josh(at)agliodbs(dot)com> | 
|---|---|
| To: | "Mark Wilson" <mark(at)mediasculpt(dot)com>, <kenzo(at)kennethambrose(dot)com>, <pgsql-novice(at)postgresql(dot)org> | 
| Subject: | Re: Big Picture | 
| Date: | 2002-10-23 04:48:25 | 
| Message-ID: | web-1796139@davinci.ethosmedia.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-novice | 
Ken,
> >   My general thinking is that one fundamental concept of RDBMS is
> data
> > _independance_ from applications (if I understand Dr. Codd
> correctly).
> This
> > faciliates the _same_ data to be used effectively and safely by
> many
> > different applications over the lifetime of the enterprise.  So if
> > additional code in the database reduces the effectiveness with
> which data
> > can be shared among different applications in the enterprise, at
> that
> point
> > I would advocate for that code to be somewhere else (assuming that
> code
> > doesn't risk "nonsense" data).
But it does risk "nonsense" data.   Look,in an ideal application, you
would have:
layer 1: SQL-DDL: tables, data repository
layer 2: Views, Triggers, Rules and Constraints:  data integrity rules
	and data abstraction
layer 3: Perl, Java, CORBA, whatever: data access and data security
	rules
layer 4: Perl, Java, CORBA, whatever: business rules and logic
layer 5: Perl, Java, CORBA, whatever: application logic and flow
	control and user rights
layer 6: HTTP + Perl/PHP or Java or QT or whatever:  User interface
	components.
Which is real great if you're working with a $250,000 budget.  However,
most of my applications run about $9,000 and look more like:
layer 1: SQL-DDL: Data repository. tables
layer 2: Views, Triggers, Constraints, PL/pgSQL procedures:  data
	 security, business rules & logic, data integrity rules
layer 3: HTTP + PHP: user interface components, flow control, user
	 rights.
For the above 3-layer "simple" application, putting the business rules
in PostgreSQL procedures, triggers, and rules makes a *lot* more sense
than putting them in the PHP.   Yes?
-Josh Berkus
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jules Alberts | 2002-10-23 08:10:33 | Re: arc relationship [was: db design question] | 
| Previous Message | Mark Wilson | 2002-10-23 02:12:45 | Re: Big Picture |