I would say that if no connection between the databases are required then
two sessions are pretty fine.
e.g no query like "db1.table1 join db2.table2" exists

otherwise, it might still work to use one session by importing/definig your
table classes twice, and adding all of them to your session with
Session.configure(binds={db1.table1: engine1, db2.table1: engine2})



On Thu, Dec 2, 2010 at 3:29 PM, gayatri <tunetog3...@gmail.com> wrote:

> Hello All,
>
> We have a client-server application. On server side we have two
> databases with same set of tables.
>
> Based on the client request, server has to get data from the
> corresponding database.
>
> So, in this scenario, I would like to know which of the following
> approaches is better?
>
> 1.To have two sessions and have a lookup based on the client request.
>
> 2.Have a single session and use sharding.
>
> Thanks,
> Gayatri
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to sqlalch...@googlegroups.com.
> To unsubscribe from this group, send email to
> sqlalchemy+unsubscr...@googlegroups.com<sqlalchemy%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/sqlalchemy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to