[ciapug] Re: Re: MySQL 5 Stored Procedures (correction)

Carl Olsen carl-olsen at mchsi.com
Mon Jul 10 17:17:02 CDT 2006


I have re-written an entire set of stored procedures I wrote for SQL Server
so they would run on PostgreSQL, and I actually enjoyed it because of how
much I learned about PostgreSQL.  Writing them in MySQL is easy, because
they are very similar to both SQL Server and PostgreSQL.  I don't think
there's any danger I'll be using anything but MySQL for a long time to come,
but my stored procedures are not difficult to convert to another DBMS.

-----Original Message-----
From: ciapug-bounces at cialug.org [mailto:ciapug-bounces at cialug.org] On Behalf
Of Tony Bibbs
Sent: Monday, July 10, 2006 4:40 PM
To: carl-olsen at mchsi.com; ciapug at cialug.org
Subject: Re: [ciapug] Re: Re: MySQL 5 Stored Procedures (correction)

Given how popular database portability is, I fail to see the real 
usefulness of SP's if you really want to maintain portability.  Sure, 
most abstraction layers allow you to call SP's on the server, but more 
than not, the crap inside the SP is DBMS specific.  Therefore, my view 
is that if you are using ADODB, PEAR::DB, Creole or PDO then you should 
really limit the SP's you want to use.  Here at work we only use SP's as 
a last resort when we have some serious performance issues...which 
hardly ever happens.

To top that off, as soon as you use SQL in your code you run the risk of 
breaking your portability because many developers fail to write portal 
SQL.  That's why you have persistence tools like Propel which get aim to 
limit how much actual SQL the developer has to write (plus it gives you 
that clean data tier you are after).

Now, if you are using the native PHP driver (e.g. mysql or mysqli) and 
you know you'll never change DBMS's, write all the SP's you want.  Just 
my take...

--Tony



More information about the ciapug mailing list