Whitehawke has asked for the wisdom of the Perl Monks concerning the following question:

Oh wise monks, share with this humble one your knowledge.

There are plenty of modules on CPAN that will take a DB schema and turn it into objects--Class::DBI and Alzabo are two of them. Is there anything which will go the other way? I'd like to be able to create Perl objects (or write a config file), and then have perl create the tables based on those objects--or, at least, write the schema which I can then run.

Replies are listed 'Best First'.
Re: Object to schema conversion?
by perrin (Chancellor) on Apr 15, 2005 at 01:51 UTC
    Tangram
Re: Object to schema conversion?
by merlyn (Sage) on Apr 15, 2005 at 06:11 UTC

      Thanks Randal, OOPS looks like a very good candidate.

      Have you played with it any more since 7/2004? If so, what have you found?

Re: Object to schema conversion?
by Tanktalus (Canon) on Apr 15, 2005 at 03:35 UTC

    I did this with DB2::db for DB2. But I don't have the DB experience to do it for other vendors. (I'm not sure I really have the DB experience to do it for this vendor, but I found it useful, so I put it on CPAN in case others did.)

    (In fact, this was the primary reason I started DB2::db - querying, inserting, and updating were all secondary.)