[Tutor] code design problem

alan.gauld@bt.com alan.gauld@bt.com
Tue, 24 Jul 2001 22:02:03 +0100


> The two requirements I need to satisfy are the following: 
> 1) it should be possible (and easy) to use it with the 
> database engine 
> of choice;
> 2) it should be possible (and easy) to plug in new data handling
> modules to make the tool more powerful.
> 
> Therefore I am trying to put the database connection code in a class
> by itself, that will take care of loading the module(s) implementing
> the database interface, open the connection, and always 
> return a database
> "cursor", independently from the specific db engine.

Far be it from me to spoil your fun but isn't this already 
done in the standard Python library? ISTR that it has 
a generic data access module which can be configured 
to use any of the vendor specific versions under the 
covers...

Just a thought.

Alan g