Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Eliminating Dynamic SQL Generation with Decision Matrices for Tighter Large Scale Applications

by simonm (Vicar)
on Mar 28, 2002 at 07:00 UTC ( [id://154903]=note: print w/replies, xml ) Need Help??


in reply to Eliminating Dynamic SQL Generation with Decision Matrices for Tighter Large Scale Applications

Saying you're strongly against runtime SQL generation strikes me as similar to saying that you're against procedural programming... It leaves out the context of the problem that you're solving.

If you're building a script with a known number of queries, a static collection of queries may adequately address your needs, and if your queries are fairly complicated or high-volume, I can understand putting in the effort to optimize them.

However, if you're building a more open-ended system with various ad-hoc query capabilities, such as an OO-RDBMS mapper, you might find that pre-writing all of the queries one might possibly use is laborious, and properly selecting amongst them (the "only thing lacking", above) becomes an increasingly complex problem.

There must actually be a whole range of possibilities here, ranging from static, to mostly static with some dynamic subclauses, to mostly dynamic with a few static hand-optimized queries, to completely dynamic, and all sorts of other variations. Each of those techniques will be good at solving some kinds of problem, and less useful for others... And of course, the quality of the individual library's implementation, and the developer's level of comfort with the approach, are factors that are at least as important as whether the SQL is written in advance or not.

Without a discussion of the context -- what you're doing and why -- declarations of jihad against dynamic SQL (or against dynamic binding, or against Microsoft, or whatever) have a ring of hollow ideology to my ear.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://154903]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-03-29 01:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found