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. ------
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
|
|