Thanks for your great explanation, I think I would help, but I must describe some additional information in my using: I try to create a proof-of-concept for a database builder eg http://www.liquibase.org/ I use for my project SCons ( http://www.scons.org ) like a build toolkit and would like to add a database builder, that can create and update any database So I would describe the database structure like a Python dict. I don't want implementate all database specific parts, so I would like to use SQLAlchemy, in my case something like: database description => SCons builder => SQLAlchemy => database driver => database
So the creating / update process should be in a transaction, because if the builder process fails all changes should be restored. SCons itself uses a more functional structure, so I generate from the input of the builder the sqlalchemy.Table objects and run these objects with the metadata. I'm testing the codes with mySQL and Postgres. So at the moment I'm learning the structure of SQLAlchemy and try to create the description of the database first. At the moment I don't know which way is the best to create the database structure, the best is, that the user does not see any SQL specific parts, so would you create Python classes for the databases (ORM style) and push them to SQLAlchemy for creating the structure? How can you updates these tables eg a field type is changed? I have got two SCons builds, one creates a database (primary create table & insert statements) and a second builder for alter statements, but in this upate process I need also a "post & pre processing", because if I would like to change a field from nullable = yes to nullable = no I must run first a update for all "null" rows. Back to my question, all build processes of the database should be in a transaction, so if an error occures all changes should be reverted. Thanks for you help -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.