El Sáb 29 Nov 2003 08:45, Paul Thomas escribió:
> On 28/11/2003 17:10 Jason Tesser wrote:
> > [snip]
> >
> > I completely disagree. I do a lot of programming with PHP and the
> > features
> > of Postgres come in handy. Let me give you an example of just some
> > basic things. Triggers! Why should I have to write insert and update
> > triggers in the logic (PHP) if I can handle it at the database level.
> > Sql
> > is 10x as fast as the language. Better to handle what you can at the
> > database
> > level. Same with views and stored procedures.
>
> Stored procedures can be a 2-edged sword. They can lead to business logic
> being scattered between the persistence layer and the business layer.
> Thats not good for maintaining the application 3 years down the line.
> Triggers can also cause maintenance problems. Its so easy to forget/fail
> to document that inserting a record into table x causes column y of table
> z to be updated. Be careful how and where you use these features as they
> can come back to bite you!
Please, don't blame the feature. Blame the poor documentation that the
programmer did.
If you program the right way from the beginning, Stored Procedures, Views,
Triggers, etc. are great for getting good performace applications. And it is
the way DB Apps Designers should work, IMHO.
--
10:42:02 up 3 days, 17:06, 1 user, load average: 0.01, 0.02, 0.06
-----------------------------------------------------------------
Martín Marqués | select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica | DBA, Programador, Administrador
Universidad Nacional
del Litoral
-----------------------------------------------------------------