[orm-devel] Automatic table modufication (was: orm)

Ross J. Reedstrom orm-devel@mailman.tux4web.de
Sat, 7 Dec 2002 12:03:11 -0600

On Sat, Dec 07, 2002 at 07:29:45AM +0100, Diedrich Vorberg wrote:
> Hi Ross,

Actually, the quoted text here was written by Eric Walstad. (though
I agree with the sentiment;-)

> >I'd stay away from the idea of making orm do schema management.  My fear 
> >would be that adding this kind of feature set would make orm bloated and 
> >cumbersome.  I also think that schema management is best left to the db 
> >supplier (or other third parties that specialize in it).  I generally 
> >put a lot of thought and time into designing a schema that will 
> >efficiently model the problem domain.  Actually building the tables 
> >takes up only a small portion of this time.  I really *hate* changing 
> >the schema once the entities/tables have been created - the ability to 
> >have orm do it for me doesn't sound very interesting.
> If this is done it has to stay in a module of its own and should not
> make changes to any other part of orm necessary. With that requirement
> met I don't see any harm done. I can see side how it could be usefull
> for some.

Right, so it's almost an app _on top of_ orm.

> Personally I change around the tables a bit but that usually means
> changing the app, too. The effort bringing orm up-to-date with the
> SQL is dwarfed by the work spent on that.

One feature I like about ORM is that it doesn't force a specific
object:table mapping. By that I mean my python objects can diverge from
the database. For example, I can add computed attributes, extra methods,
multiple objects that are different mappings of the same table - lots
of things.