[DB-SIG] Switching databases

Denis S. Otkidach ods at strana.ru
Mon Sep 1 12:21:52 EDT 2003


On Mon, 1 Sep 2003, Neil Hodgson wrote:

NH>     We are currently using an Oracle 9i database through
NH> DCOracle2,
NH> directly importing DCOracle2 and sometimes referring to
NH> DCOracle2.dco2,
NH> the DCOracle2 time/date types, and DCOracle2.DatabaseError.
NH> In the
NH> future we may want to experiment with cx_Oracle or another
NH> database such
NH> as MySQL.
NH>
NH>     Are there any good strategies for providing flexibility
NH> and avoiding
NH> mass code changes here?

The only way I know: write your own adapters for desired
databases and switch to them from DB API.  There are two most
known incompatibility issues with DB API: paramstyle and
date/time conversion.

-- 
Denis S. Otkidach
http://www.python.ru/      [ru]




More information about the DB-SIG mailing list