Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
CDBI is an example of an object-relational mapping system. One thing you may be stumbling over is that this is most definitely not the best solution in many cases. (In fact, some may say that object-relational mapping is usually a good indication your database is poorly designed, but that's another discussion. Google Fabian Pascal for more info.)

Many applications instead require a business concept to relational mapping, where you have database accessors that provide business-model API calls, regardless of the underlying architecture. CDBI is not intended to solve this problem. In fact, using it in this case would cause you nothing but headaches trying to fit a perfectly good square peg into a round hole.

That said, CDBI is very good when it's used where it's meant to be used. A lot of smaller applications can decompose their data into a class-to-table relational structure. This isn't to say that CDBI is only useful for smaller applications. It's just that most of the examples I've seen where CDBI really shines are for smaller things like picture albums and CDDB-type MP3 lookups. I'm sure there are a lot of larger enterprise-level apps that are perfectly happy using CDBI for their RDBMS access.

I've never worked on an app that would have benefitted from it, but I also tend to work on apps that do a lot of custom reporting. While CDBI would help the development effort, I also have a lot of performance constraints that CDBI would miss unless I threw a ton of hardware at it. In my current app, for example, every single report (with a few exceptions) has to run in under 5 seconds, no matter what load or what the SQL looks like. Period. CDBI has too much overhead and innefficiency built in to be useful there, even if the syntactic sugar would be nice.

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested


In reply to Re: Class::DBI not intuitive by dragonchild
in thread Class::DBI not intuitive by Jaap

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 examining the Monastery: (8)
As of 2024-03-28 09:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found