On Wed, Aug 26, 2009 at 2:56 AM, chris mollis<[email protected]> wrote:
> There is a school of thought of that all operations should be handled in the
> ORM..   that all data should be accessed as in-memory 'objects' via (OQL or
> whatever).   I guess that's nice and neat from a conceptual perspective..
> but not very practical.. particularly when performance matters (which is
> like..um.. always).    ORM's inevitably have to manage large graphs of
> objects in-memory.. which they are not really designed to do.

It's a question of whether databases should be dumb or smart.  Some DB
admins insist that the proper place for validation is in the database
itself, using triggers to ensure all data is meaningful.  Some will
not even allow clients access to the tables except through stored
procedures.  That does have an advantage when the same database is
used by several clients in different languages.

But to me stored procedures are a step back into the dark ages when
languages were procedural and limited, with each platform having its
own syntax and different features.  We might as well put the entire
application in the database and not use Python at all.  Except that
RDBMS scripting languages suck ass.

Plus, I value the ability to switch to a different database platform
without rewriting my application.

ORMs are inherently kludgy, but the advantages of concurrency, ad hoc
queries, low memory footprint, autoincrement columns, date
comparisions in the database, etc, make RDMBS's worth their while
unfortunately.  So we're stuck with them.  But the "active record"
model just isn't efficient for some things, so trying to do everything
through an ORM is nonsense.

If you really want a database abstraction layer, it has to be more
abstract than an ORM can provide.  Otherwise you may be able to port
it between different SQL databases, but not between SQL and non-SQL
databases.  Again, that depends on how sure you are that you'll want
to stick to the same database for the long term.

-- 
Mike Orr <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to