[ciapug] Re: Re: MySQL 5 Stored Procedures (correction)
Daniel.Juliano at wellsfargo.com
Daniel.Juliano at wellsfargo.com
Mon Jul 24 13:56:30 CDT 2006
>> Daniel.Juliano at wellsfargo.com wrote:
>> [...] Writing such
>> a component is a one-time effort, you can reuse that
>> component each time you access a database. Stored
>> procedures are not the answer, Dynamic SQL is."
>
> Tony wrote:
>
> Which is exactly what Propel gives you. Dynamic, portable
> SQL in the form of prepared statements. In fact, much of
> your code won't even have SQL embedded in it: [...]
Bingo, that's exactly where the discussion leads. I was
explaining an O/R Mapper called ActiveRecord to my co-worker,
and how it:
a) cleans the SQL out of your code (just like, don't mix
your php, html, css, and javascript together - save headaches
and put them all in their separate places), and
b) executes just as fast (if not faster - read that blog) as
the stored proc way most Microsoft coders are used to (I used
to be one)
> Also, I don't agree with the all-or-nothing approach
> (e.g. either prepared statements or stored procedures).
> I look at SP's as a tool for performance tuning an
> application.
Certainly. If you've got a five step query that populates
buffer tables then generates a report off the buffers, you've
probably far exceeded the bounds of Propel, or even your
ability to encapsulate sql inside a php file. This stuff
should live in the database.
> And I'm sorry about yet more Propel rhetoric...I'm even
> annoying myself with it. But it is really worth a good
> once over for any PHP5 developer.
I second that notion.
More information about the ciapug
mailing list