Hey All,

Maybe I'm missing something, but isn't this what reflection is all about?  You
can easily (well, on most DB's at least) throw a bit of explicit SQL at the
database to get a list of all the tables, from there simply create the
necessary Table() objects.  It might take a while, of course, but the whole
affair might be easily pickle()-able as well.

For example, I do the following:
   tables_list = ['boats', 'certifications', ...  'temp_new_customers', 'tours']
   for tab in tables_list:
      exec('self.t_' + tab + ' = DB.Table(tab, backend.engine, autoload = 
True)')

That's not a terribly elegant way of doing it, now that I look at it :P  Maybe
something like this would be better:
      setattr(self, 't_' + tab, DB.Table(tab, backend.engine, autoload = True))

That's much nicer :)
-G

On Sunday, May 7, 2006, 9:44:06 AM, you wrote:
> I used to do work for financial institutes, and usually there's always a
> handfull of old db driven projects around that get dragged on forever, they'd
> have hundreds if not thousands of tables. And if you walk into their office
> rooms, they'd use huge DB diagrams of their app as wallpaper (must be a nerd
> thing). Usually they'd have one or multiple people work on a table complex 
> that
> somewhere bordered with other table complexes.

> Quoting Jonathan Vanasco <[EMAIL PROTECTED]>:
>> Florian is right.  its a strict 3nf and a giant data model that is as
>> highly relational as it is gigantic.  I tried to split it out into 4
>> sep. databases, but needed to join  too much of the data to do it any
>> other way than fully integrated.
>>
>> considering  simple bulletin board apps that you can download as foss
>> apps are around ~30 tables, i don't think even 400 tables is too big
>> for something structured to be a serious enterprise application.
>>
>> On May 6, 2006, at 3:57 PM, Florian Boesch wrote:
>>
>> > C'mon you can be nicer then that. Sure 234 tables is much, but not
>> > that much for
>> > a big data model and a strict 3rd normalform design. I mean, I
>> > consider myself
>> > running a fairly simple datamodel, and what I do is fairly gruft
>> > free as it's
>> > fresh, and it has easely accumulated 50 tables. 234 doesn't seem
>> > like a stretch
>> > for me at all.
>> >
>> > Quoting Michael Bayer <[EMAIL PROTECTED]>:
>> >
>> >> id ask why you have 234 tables in the first place.....
>>
>>
>>
>> -------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> Sqlalchemy-users mailing list
>> Sqlalchemy-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users
>>
>>




> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Sqlalchemy-users mailing list
> Sqlalchemy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to