28 Apr 14:06
Re: emulating 'nested tables'
From: Oleg Broytmann <phd <at> phd.pp.ru>
Subject: Re: emulating 'nested tables'
Newsgroups: gmane.comp.python.sqlobject
Date: 2008-04-28 12:06:35 GMT
Subject: Re: emulating 'nested tables'
Newsgroups: gmane.comp.python.sqlobject
Date: 2008-04-28 12:06:35 GMT
On Mon, Apr 28, 2008 at 08:43:41PM +1200, David McNab wrote:
> class Foo(SQLObject):
> someattr = IntCol()
> otherattr = StringCol()
> things = MultipleJoin("Thing")
>
> class Thing(SQLObject):
> attr1 = BoolCol()
> attr2 = StringCol()
> foo = ForeignKey("Foo")
>
> But if the database grows to having tens of thousands, even millions of
> rows in each table, then accessing '.things' could prove pretty slow.
See my previous message to the list about SQLMultipleJoin.
> Another option is to look into dynamic creation of tables, where for
> each Foo object I create a dynamic Thing-like class.
Do you mean dynamic creation of *rows*?
Oleg.
--
--
Oleg Broytmann http://phd.pp.ru/ phd <at> phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

RSS Feed