Pythonic ORM with support for composite primary/foreign keys?
marco at sferacarta.com
Tue Nov 6 14:19:04 CET 2007
Wolfgang Keller wrote:
> so far it seems to me as if the only ORM module for Python which
> supports composite primary/foreign keys was SQLAlchemy. Which looks a
> little bit "overbloated" for my needs: I "just" need to be able to
> define a "logical model" (à la UML) in Python and have the ORM connect
> to a database (running on PostgreSQL in my case) which uses a
> corresponding (pre-defined) "physical model" as its schema.
I think if your model is complex enough that you need composite foreign
keys, the project might deserve SQLAlchemy.
Mapping a bunch of python classes to an efficient DBMS schema is not
easy by any definition of "easy".
Google for "orm vietnam"... it might also be useful to read "The Art of
SQL" even if you don't plan to write SQL by hand.
More information about the Python-list