I don't agree about most production systems using stored procedures or timed jobs for all updates. I've never seen a system that did that, although I've often heard DBAs wish that things were done with PL/SQL.
Actually, that is our group policy. Selects are done in Perl and anything which alters the database is done via a large library of on-disk stored procedures. Having them on-disk, keep the "business objects" you discuss below out of our already-cramped main memory.

Regarding timed jobs, I once worked at a vote-polling company and we simply needed to push an entirely static website every hour or so. So, we didn't need event-by-event database updates. Just queue them all in a file and do a SQL_LOAD. Also, any digital music company which receives a feed of new music products would more than likely convert this to a SQL loader file and then use the built-in tools. Broadvision, a C++ app server, for instance has this bv_load program that loads its tables much faster than you could do with Perl.

I think it's better to avoid stored procedures as much as possible, but that's a whole different topic.
I hate PL/SQL. I hate writing it. But, I have to admit that server-side processing is much faster than back and forth between client and server.
In my systems, I write Perl classes for each of the data objects I'\ ll be manipulating. These classes handle their own caching.
Let's call these "business objects". This is a good idea. It sounds like the same thing that the BingoX framework is touting, but reportedly their actual ease-of-use is quite low.
denoting the object type as my key in the cache.
And I assume you use Cache::Cache to store your data.

In reply to Re: how do you label and cache your database queries? by princepawn
in thread how do you label and cache your database queries? by princepawn

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.