python + ODBC + Oracle + MySQL - money

rios.andy at gmail.com rios.andy at gmail.com
Thu Nov 10 09:36:57 EST 2005


Well having two different Databases from one app could be painful, but
I think that using Python and a "Divide and Conquer" aproach might be
your best GPL way of handling this. Start up a set of python Classes
that just does the access to the MySQL database. Get these working,
just concentrate on building the Database accesses you will need for
your app, and give the functions sensible, and relatively verbose,
names. Next take step two, doing that same thing (In a different
directory, with a slightly different naming convention for classes
maybe), but for the Oracle Database, and test that out and get that up
and running. Now you have two apps, one for MySQL and one for Oracle.

Now the step that you might not catch on about until you have more
expereience using Python. Because of the very slick and intelligent way
that Python handles naming and operator overloading you just need to
write another set of classes that is you application.
This application can just make use of the other two DB apps you just
created by calling those classes (Hence why I suggested careful naming,
and following some sort of convention for the naming). This will
eventually translate into your app, remember you can do all the fancy
User Interface work and Program Logic work in the third set of classes
(The APP classes). I'm not sure how complicated the app is, but this
sounds like a reasonalbe high level aproach. And if you boss asks
questions about this methodology just tell him/her know that you got
recommend this approach by a Graduate of the University of Toronto with
a degree in Computre Engineering. :-P

So, hope this helps, feel free to ask more questions, hopefully others
will have some more ideas to share.

My two cents,
Andy




More information about the Python-list mailing list