in reply to Creating a model of a bad database
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.
|
|---|