Re: Somewhat OT - Stored Procedures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2011-03-03 at 11:30 -0700, Nathan Nobbe wrote:
> Hey gang,
> 
> (Yes Tedd, I like your style, when it pertains to how you address the list
> :))
> 
> I have a new curiosity that's arisen as a result of a new contract I'm
> working on, I'd like to bounce around some thoughts off the list and see
> what you folks think if interested.
> 
> The topic at hand is stored procedures.  Frankly, I've hardly ever even seen
> these in use, and what I'm trying to figure out are good rules of thumb as
> to where / when / how they are best used in application development.
> 
> Also, bear in mind that personally I tend to favor OO paradigms for
> application development so would prefer feedback that incorporates that
> tendency.
> 
> Initial thoughts are
> 
> Bad:
> . Not well suited for ORM, particularly procedures which return multiple
> result sets consisting of columns from multiple tables
> . Greater potential for duplicated logic, I think this comes down to a well
> defined set of rules for any given application, read: convention required
> for success
> . Scripting languages are vendor specific, and likely most application
> developers have a limited understanding thereof
> 
> Good:
> . Better performance
> . <Fill in blank on convincing bullets here>
> 
> I've also done some reading on MSSQL vs. MySQL and found that the former
> offers much more features.  I've also read that most databases only see
> roughly 40% of the feature sets being used for typical applications in the
> wild, and would agree from personal experience it is accurate.
> 
> >From my standpoint MySQL is popular because the features it offers are the
> features folks are really looking, one of those 80/20 things...
> 
> I stumbled into this link on a google search, it's from '04 but looks to be
> relevant to this day
> 
> http://www.codinghorror.com/blog/2004/10/who-needs-stored-procedures-anyways.html
> 
> Your thoughts appreciated,
> 
> -nathan

Would this not be a better suited question for the mysql mailing list?

regardless, I use stored procedures and functions on my mysql server
here at work, in regards to our radius accounting packets.

I will say, that it was WAY easier to send the packet dump to mysql in a
"call()" statement, than it was to try and do all the programming
necessary to insert the packet, calculate user usage, is the packet
there already, etc etc etc on the radius server.  Doing it this way, we
have 4 radius servers that just fire the same thing over to the mysql,
and if there is a change, i do it on the mysql server, and not have to
do the same thing on 4 different servers.

views, stored procedures, triggers and functions really do have their
purpose within mysql/mssql (and whichever sql server you are using if
they support them), and most of the times they are forgotten about
and/or overlooked.

take a look at this article:
http://www.tonymarston.net/php-mysql/stored-procedures-are-evil.html

Good luck, and I think you may get more response from
mysql@xxxxxxxxxxxxxxx

Steve.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux