[Zope] ZSQLMethods

Stefan H. Holek stefan@epy.co.at
Mon, 4 Dec 2000 17:46:32 +0100 (CET)


On Mon, 4 Dec 2000, Tom Deprez wrote:

> Thanks, is this code still efficient if the tables relate to 1:1 and you
> need to show a list of all records in a tabulare table?
> 
> eg key, NAME, ALIAS, ....
> 
> where NAME is from database1 and ALIAS is from database2
> 
> The code below would impact that for every record in database1, I've to
> query database2
> Is there another way to do this? (more efficient?, ie less database query)

This might not apply to your case, but with many RDBMS you can also use
the dbname when qualifying columns. With MySQL for example, having 2 dbs
on the same server you can say:

select db1.table1.column1, db2.table2.column2
from db1.table1, db2.table2
...


HTH,
Stefan