I think it depends on how important it is to hide the real schema. The ORM tools all give you a lot of leeway in terms of how to fetch your data, including custom SQL. However, with Class::DBI and Rose::DB::Object, you will still end up with objects that map to individual tables. If you want to hide the fact that one of your important objects is actually composed of data from several tables, that could be bad.

DBIx::Class tries a bit harder with this. It has a concept of result sets and they can be updated. What I don't know -- because I haven't used it -- is whether it can handle inserting and updating objects that correspond to a complex join of multiple tables, especially if the logic is so complicated it involves custom SQL and some perl processing. I think you'd better ask that on the DBIx::Class mailing list.

Ultimately, there's a good chance you'll have to write your own application-specific mapper if you really want to hide all the database details. It's really hard to do with a generic tool. I've done that before, and I would think twice before doing it again, since it took a lot of work and ended up lacking some of the good features that are available from ORMs now.


In reply to Re: Creating a model of a bad database by perrin
in thread Creating a model of a bad database by Ovid

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.