[Tutor] Query dictionaries with sql-like syntax
alan.gauld at freenet.co.uk
Wed Jul 13 20:06:06 CEST 2005
> I'm trying to migrate a lot of data from an accounting
> system software to another using Python.
he easiest way to do this is usually to create a set of
views using SQL in one database that map to the schema
in the other. You can then read the table data out of
the views and export it into the other DB.
This has the advantage of full SQL access to all tables
in the source DB and use SQL to join and manipulate field
data in populating the views. Default values can be added too.
> required, my question is: does a module/package/... exist
> to query a set of dictionaries using sql syntax
I don't know of one, thats where the Python DBI comes in
to access sql tables directly from Python, but perrsonally
for migrations, whoich I sadly seem to spend a lot of time
doing! - I prefer the view approach - provided you
a) have access tothe underlying databases and
b) they support views!
More information about the Tutor