I was reviewing multiple ORMs, Og, ActiveRecord, Class::DBI, DBIx::Class, et al, and I was wondering if anyone knows of a more a Postgres centric way of solving the problems that ORMs are supposed to solve.

The purpose of my investigation was to incorporate an ORM into an MVC. I like what rails did mutating the both of them into one. But, I think they choose the worst ORM to do so. I don't like the fact that I'm supposed to design in an app, and roll changes to a db. I would much rather design in the db, and have the application adapt. Any form of validation should first and foremost be present in the db, and secondly in the app. Is there any ORM in existence that supports deducing column/table constraints from utilities like the information_schema. I was thinking of taking on the task of redesigning an ORM. The first purpose of this post is to see if there a consensus on a non-crappy ORM in existence, and then to get critique on a few ideas I've had. These are just some ideas, of how I would design it, I have a script that assembles an array of objects for each database, containing arrays of schema objects, which contain arrays of table objects, which contain arrays of column objects, which store things like constraints etc. This seems like a good start, I might take it further if others like this idea.

As a side note indigo on freenod, pointed me to python's sqlalchemy, an ORM that appears to offer some functionality with the information_schema using an AutoLoad=True arguement. http://www.sqlalchemy.org/docs/metadata.myt#metadata

So monks, any ideas, and what ORM comes closest to a feature set like this?


Evan Carroll
www.EvanCarroll.com

In reply to Non-retarded ORMs, and a general ORM discussions. by EvanCarroll

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.