New Python ORM

4 views
Skip to first unread message

David Cramer

unread,
Jul 10, 2007, 4:43:32 PM7/10/07
to Django developers
Not sure if you guys have seen this, but maybe Django can take a bit
from what it does well.

https://storm.canonical.com/Tutorial

doug.na...@gmail.com

unread,
Jul 10, 2007, 5:26:37 PM7/10/07
to Django developers

The problem is no one knows what it 'does well' yet :-)
It is missing many of the features Django already has, and looks to be
behind SQLAlchemy which people are already working on integrating in
some fashion (maybe).


-Doug

Sean Patrick Hogan

unread,
Jul 10, 2007, 7:10:03 PM7/10/07
to django-d...@googlegroups.com
It's also just very verbose.

   1 >>
> class Person(object):
2 ... __storm_table__ = "person"
3 ... id = Int(primary=True)
4 ... name = Unicode ()

So, I have to declare a __storm_table__ and id for every model.  That should be assumed by default and allowed to be overwritten (in my opinion).

   1 >>> class Employee(
Person):
2 .. . __storm_table__ = "employee"
3 ... company_id = Int( )
4 ... company = Reference(company_id, Company. id)
Here we see that I have to declare a company_id and the the foreign key - Django does this in one step with ForeignKey(Model).

It just seems that Django's ORM is already syntactically nicer and, other than inheritance, Storm doesn't seem to have any really compelling feature.
--
www.PovertyFighters.com

If you knew you could fight hunger and poverty, conserve the environment, empower women, combat AIDS, improve labor standards and win a national competition for your university--all with only two clicks a day--would you do it?

David Cramer

unread,
Jul 11, 2007, 1:30:33 PM7/11/07
to Django developers
Ya some of the stuff seems like a bit of extra work. I really like how
they handle the objects in memory though so they're referencable
before saving in the database, even with ForeignKeys. Although our
Django is patched, the current trunk doesn't even store multiple
references to the same object in memory.

They also support multiple primary keys! *grumble*

On Jul 10, 4:10 pm, "Sean Patrick Hogan" <scad...@gmail.com> wrote:
> It's also just very verbose.
>
> 1 >>> class Person(object):
> 2 ... __storm_table__ = "person"
> 3 ... id = Int(primary=True)
> 4 ... name = Unicode()
>
> So, I have to declare a __storm_table__ and id for every model. That should
> be assumed by default and allowed to be overwritten (in my opinion).
>
> 1 >>> class Employee(Person):

> 2 ... __storm_table__ = "employee"


> 3 ... company_id = Int()
> 4 ... company = Reference(company_id, Company.id)
>
> Here we see that I have to declare a company_id and the the foreign key -
> Django does this in one step with ForeignKey(Model).
>
> It just seems that Django's ORM is already syntactically nicer and, other
> than inheritance, Storm doesn't seem to have any really compelling feature.
>

Brantley Harris

unread,
Jul 11, 2007, 4:54:56 PM7/11/07
to django-d...@googlegroups.com
This really isn't meant to compete with Django, more with SQLAlchemy.

So far it seems like it's main competing feature is handling
multiple-databases easily and joining across them.

Damien Gassart saw these posts on digg, made by zzzeek and niemeyer,
the SQLAlchemy and Storm lead developers, respectively:

http://programming.reddit.com/info/24oo3/comments

Reply all
Reply to author
Forward
0 new messages