[Python-il] [pyweb-il:379] Re: q magic (sqlobject) and c magic (sqlalchemy)

Imri Goldberg lorgandon at gmail.com
Tue Sep 1 01:12:09 IDT 2009


On Tue, Sep 1, 2009 at 12:43 AM, benny daon <bennydaon at gmail.com> wrote:

> For me, Django's db model does a pretty good job of delivering relational
> database power without forcing me to learn sql. What's more it makes it
> easier to support non-relational databases at the back-end, i.e.  google's
> big table.
>

Excellent.


> I'm sure that for someone with sql experience, sql* works better. For
> someone with my very limited sql experience, select and where are confusing.
> I like Django for hiding the sql parts and using python taxonomy whenever
> possible.
>

Actually, the where is a name chosen by the programmer (i.e. me, or the
example's writer). It could have been predicate just the same). Maybe not so
for select, but today I believe that it's ubiquitous enough to not confuse.


> I think the 1.1 changes Idan showed are a positive evolution - finding more
> pythonic ways to get more juice out of the db - but I don't think Django
> will never completely satisfy an sql perfectionist :-)
>

I'm not an sql perfectionist - far from it. I do think that sqlobject &
sqlalchemy are more pythonic, especially when I look at constructs such as:

bla.filter(some_number__gte = 5)

and

bla.select(bla.q.some_number >= 5)

and more complex

bla.select((bla.q.some_number < 4) | (bla.q.some_number >
bla.q.other_numer*bla.q.yet_another))

It seems to me that F() is django catching up.

I remember that in the first pyweb-il meeting I attended - I asked Ahik
whether he would use django's ORM for projects not related to
web-programming. IIRC, his answer was no. Back then, it was one of the
reasons I stayed with turbogears - the ORM(s) were better.

Cheers,
Imri
-- 
Imri Goldberg
--------------------------------------
www.algorithm.co.il/blogs/
--------------------------------------
-- insert signature here ----

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PyWeb-IL" group.
To post to this group, send email to pyweb-il at googlegroups.com
To unsubscribe from this group, send email to pyweb-il+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/pyweb-il?hl=en
-~----------~----~----~----~------~----~------~--~---

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://hamakor.org.il/pipermail/python-il/attachments/20090901/7fae4566/attachment.htm 


More information about the Python-il mailing list