Hello, Monks.

I've been working on a project recently here at work that involves some fairly heavy database interaction, and it needs to be available to non technical users. up until now, I had just been using sql in a client application when I wanted statistics on the project. Now these reports need to be made available dynamically to many people via cgi applications.

So I am thinking of building an API, because I forsee the management and "higher-ups" wanting more tools in the future that I might not be called on to create. The question I'm faced with is "do I use stored procedures (i.e., plsql), do I write a perl module, or do I just do what I've been doing, which is hack-as-needed?"

So I've been thinking about this a bit. I can do one of three things:
  1. Stored Procedures
  2. Perl Libraries
  3. Do Nothing
I'll lay out here what I think the pro's and con's here, and tell you where I'm leaning afterwards:

Pro:

Con:

The reason I bring this up here, and don't just go hack it out in perl is I'm worried I have nailitis. Like, I am a perl zealot and I am choosing to do something in perl that isnt really appropriate to do in perl. I think I've got a pretty good grasp of the situation, but I am looking to the monastery because I know that we have some DB hackers among us. I'm sure somebody here has encountered a situation similar to this and I'm also sure many of you have input on this, and also comments on my pros/cons.

I'd also like to know what people think about the speed of an object and running stuff through DBI rather than having the stored procedures in the database. The database in question is currently PostgreSQL, but we have talked about moving to Oracle. This may matter if significant gains can be had from stored procedures being optimized in Oracle ... I leave the commentary up to you.

Thanks for your time, Monks.
brother dep.

--
Laziness, Impatience, Hubris, and Generosity.


In reply to plsql vs. perl vs. neither and API's (code) by deprecated

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.