Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.


In reply to Re: Eliminating Dynamic SQL Generation with Decision Matrices for Tighter Large Scale Applications by simonm
in thread Eliminating Dynamic SQL Generation with Decision Matrices for Tighter Large Scale Applications by princepawn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found