Hi,

I've prototyped a database using Metakit (which allows tables to have
nested tables as columns), and want to migrate it over to use SQLObject.

Consider:

  class Foo(SQLObject):
    someattr = IntCol()
    otherattr = StringCol()
    things = MultipleJoin("Thing")

  class Thing(SQLObject):
    attr1 = BoolCol()
    attr2 = StringCol()
    foo = ForeignKey("Foo")

This will give an effect similar to 'nested tables', since the '.things'
attribute of any Foo object will yield a list of Thing records.

But if the database grows to having tens of thousands, even millions of
rows in each table, then accessing '.things' could prove pretty slow.

Another option is to look into dynamic creation of tables, where for
each Foo object I create a dynamic Thing-like class. But I don't know
how I could get the convenience similar to just fetching '.things'
attributes of Foo objects to access each dynamic table.

Can anyone suggest the best way to get decent scalable performance with
this scenario?

Cheers
David



-------------------------------------------------------------------------
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
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to