SQLObject or SQLAlchemy?

Jorge Vargas jorge.vargas at gmail.com
Thu Aug 31 23:06:01 EDT 2006


On 8/31/06, John Salerno <johnjsal at nospamgmail.com> 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.
>
they use two approach to the same problem.

SO tries to tide each object to a table while
SA lets you do the mapping.

so each one has it's pros and cons.

for example SA wins at using an existing db
but SO wins at not worring about the db structure

SO demands tables to have a primary single col int key which is manage
by the API, while SA lets you mess with it a bit more.

so you could say that SO takes care about many things so you don't
have to worry about them, or other may say SO is too intrusive.

In my experience SO is great for new projects and if you don't want to
mess/optimize with the actual SQL queries (which is great for an ORM
because IMO that is the main goal of ORMing)

Now if you need to mess a lot with the db (either a existing one or
need optimized queries) then SA is worth the extra effort, since
making those things on SO is going uphill.
> Thanks.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list