Object Relational Mappers are evil (a meditation)

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Mon Oct 5 10:39:17 EDT 2009


Aaron Watters a écrit :
> This is a bit off topic except that many Python
> programmers seem to be allergic to typing SQL.

What I am mostly allergic to is manipulating sql queries as strings and 
resultsets as lists of tuples. I strongly prefer a higher level 
representation of both the queries and the resultsets. From this POV, 
SQLAlchemy or Django's ORM are better than the primitive scheme above - 
and don't have that much impact on db design.

> RESOLVED:  Using ORMs leads lazy programmers
> to make bad database designs.

to me, a "lazy" programmer is someone that is mostly concerned with not 
repeating itself. As such, "lazy" usually ends up with better designs 
(db or whatever) !-)


>  It's better to
> carefully design your database with no invisible
> means of support and there is no reason to not
> use SQL directly for this purpose.

I don't use SQL to *design* my databases, I use SQL (directly or 
indirectly) to create and mananage my schemas and datas.

For the design part, I usually start with a pencil and some paper.

(snip remaining rant).



More information about the Python-list mailing list