Warren Young wrote:
> Jim Wallace wrote:
>> I use SPs almost exclusively with MySQL++.
> Okay, I'll bite. :)
> My ignorant view is that stored procedures are software written in a
> quasi-proprietary language that's less powerful and arguably even uglier
> than C++
That describes SQL also in general, but does not appear to stop anyone
from using SQL.
>, which must be stored in the DB engine
> where it's resistant to
> source code control and other change management practices that overcomes
> these difficulties.
Just because the stored procedure is on the server does not mean it can
not be put under source code control anywhere.
> If by some wild chance I've managed to capture the essence of the issue,
> what compelling value do you find that outweighs these problems?
> If, as seems more likely, I'm wrong in my assessment, I'd appreciate a
> viewpoint correction.
Think of stored procedures as C functions. One passes parameters to them
and they return results. That is an ease of use issue. The set of stored
procedures for a particular database is analogous to the functions in a
C library. That is an ease of maintenance issue.
Another main reason for stored procedures is that they do intermediate
things on the server side without having to round-trip back to the
client. Sometimes complicated calculations require calls into the
database before the final action is done. Having all these actions
reside on the server saves quite a bit of round trip time.