Joe Breeden queried:

>>It would be interesting to know how other people have solved 
>>that problem.
>>Currently, we are essentially using embedded SQL in our apps. 

I have found that stored procedures + perl module wrapper around the procs.
is a nice, balanced approach.

The procs. give a nice performance boost as they are precompiled into the
server (we use Sybase). I believe that they are more secure, in that you
aren't dynamically generating sql that might be 'hijack-able'. You are
providing a discrete amount of functionality. Placing the stored procedure
execution code in a perl module makes for easy/clean perl access from the
rest of the app. Moving to a new db isn't too terribly difficult in that the
proc names will probably remain as well as the parameters that you pass.
Also, how often do you move to another database in the life of a web app
anyway (at least in our corporate environment)?

Regards,
Dave

"Language shapes the way we think, and determines what we can think about."
-- B. L. Whorf  

Reply via email to