468,317 Members | 1,566 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,317 developers. It's quick & easy.

Using an object-relational mapper to convert between databases

Hello,

I'd like to be able to do the following:

- open a connection to a MySQL or PostgreSQL database
- read the schema and contents for one or more tables
- create a new sqlite database file and open a connection to it
- write out the previously-read tables and their contents to this new
database

I get the impression that the various object-relational mappers such
as SQLAlchemy and SQLObject can make this easier, especially if using
something like SQLAlchemy's autoloading capability to query the schema
from the DB rather than me having to explicitly specify it. But then
how easy is it to make a corresponding sqlite table and write the same
objects to it? I don't know how practical this is with SQLAlchemy, or
if a different ORM library would be more useful for this. And since
objects tend to be closely related to the database they are mapped to,
I don't know how easy it is to reflect them onto a second database.

I'd just like some advice and pointers from anybody who's tried
something similar to this or who knows the packages well enough to
point me in the right direction.

--
Ben Sizer
Jun 27 '08 #1
0 541

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Michael Sparks | last post: by
28 posts views Thread by Daniel | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.