Re: Triggers, Stored Procedures, PHP. was: Re: PostgreSQL Advocacy, Thoughts and Comments

From: "Jason Tesser" <JTesser(at)nbbc(dot)edu>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Triggers, Stored Procedures, PHP. was: Re: PostgreSQL Advocacy, Thoughts and Comments
Date: 2003-11-29 16:24:53
Message-ID: 04875CB4331F0240A0AD66F970978651160A34@paul
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

[snip]

> 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!

A programmer that doesn't document stuff needs to find a new job :-)
This is more of an issue with management. Anyone who does database apps
for on any kind of a large scale will tell you that views, triggers, etc..
are essential. I am currently in teh process of writing a complete solution
for the college I develop for. Finance, accounting, pos, registration,
student tracking etc...

>> MySQL cannot even handle
>> sub-queries yet. I also use Python for standalone interfaces to the data.
>> Why should I not be able to use the same views and triggers etc in there
>> that I use for my web apps. PHP is quite powerful if used correctly.

> You are, of course, free to do whatever want. But if you have to use
> features of the database to compensate for inadequacies in your
> programming language maybe you should be using another language?

You might not have understood me or I am not understanding you. Changing
languages is not teh problem, if the database doesn't support views it still
won't if you change languages lol! Changing databases in this case is the
answer.

<snip>

> I'm not aware of any "issues" with Java (unless you mean Swing ;)).
Swig is awful.

Much of the populatity of MySQL seems to stem from PHPs out-of-the-box
support for it. With the MySQL client library license change, this
situation will probably change. There was a long thread about this earlier
this year. Check the archives.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Travers 2003-11-29 16:26:36 Re: PostgreSQL Advocacy, Thoughts and Comments
Previous Message Chris Travers 2003-11-29 15:55:37 Re: Humor me: Postgresql vs. MySql (esp. licensing)

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-11-29 16:42:57 Re: cvs head configure broken for --with-krb5 on RH9
Previous Message Kurt Roeckx 2003-11-29 13:14:43 Re: gettimeofday() goes backwards on FreeBSD 4.9