On Wed, Jan 4, 2012 at 6:50 PM, Andre Terra <andrete...@gmail.com> wrote:

> You won't need to write raw SQL in Django until you've reached a big
> bottleneck, and one that can't be solved in any other way. Writing raw SQL
> is exactly what Django wants you to *stop* doing. The ORM doesn't only
> exist in order to speed up development. It provides a layer of abstraction
> that also allows for easy refactoring and code improvement. SQL is not as
> flexible.
>

I havent read the rest of the thread; but I agree with what you mentioned
in your reply, with suitable reservations on the above comment.

SQL is highly flexible provided you know to write good sql (its like the
way Russell mentions 'It Depends' :P ); atleast i have been writing sqls
for the past 8 years and i find it easy to write them when the
relationships are complex. I come from a database family, and writing
highly database cohesive apps is what i have been doing for quiet sometime.
And it is very much given that, if you are writing a reporting app with
30-40 tables, then you would end up writing raw sqls(this is NOT the norm
for a non-reporting app).

But when i mention the above, i also see that django ORM produces some
really nice SQLs for mediocre usecases, i.e, i am yet to stumble on a case
wherein the SQL produced by the ORM wouldnt be the same(tuned) as what i
would write. So Kudos over there. In my spare time, i always mess around
with hierarchical queries and what not to see what the django-orm produces
and i must say that it has been a good learning experience.

To cut verbiage/or to summarize...and...Not to confuse the OP : yes, as
Andre mentions, if you do not have any advance use cases; go ahead with
django orm. It wouldnt give you any sleepless nights.

-Venkat

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

Reply via email to