SQLObject or SQLAlchemy?

metaperl metaperl at gmail.com
Thu Aug 31 15:08:54 EDT 2006


John Salerno wrote:
> Are there any major differences between these two? It seems they can
> both be used with TurboGears, and SQLAlchemy with Django. I'm just
> wondering what everyone's preference is, and why, and if there are even
> more choices for ORM.

I just finished surfing both websites last night myself and here is
what I glean

-- I dont see why SQLObject could not be used with Django

-- SQLAlchemy is not just an ORM. It can be used that way. I dont know
why you have to explicitly tell it about related tables twice though.
You do it the first time when defining table metadata:
http://www.sqlalchemy.org/docs/tutorial.myt#tutorial_schemasql_table_relationships

but when you have to make a call to relation as well:
http://www.sqlalchemy.org/docs/tutorial.myt#tutorial_orm_relationships

It would seem that one or the other is enough and having to do both is
redundant... continuing with the comparison

-- SQLObject makes it clear that it only has support for tables with a
single-column primary key

-- tha can both do self-joins

-- SQLAlchemy has support for connection pooling

-- ORMS get slow when you need to load a lot of records. SQLAlchemy has
usage modes to load massive data sets when the job calls for it.

> 
> Thanks.

Just my 2 cents.




More information about the Python-list mailing list