All,

I have the beginnings of something that might actually be CPAN-worthy:
a translator for converting one database's create syntax into
another's.  I had personal need to convert MySQL and Sybase to Oracle,
so I've got the basics of those worked out, and I'm trying to find a
nice way to produce XML.

Currently, I'm using Parse::RecDescent to parse, and some general
purpose "print" code to produce the output.  I'm breaking it into
smaller modules (Parsers and Producers), with the idea being that any
Parser can be used with any Producer in the conversion process.  So,
if you wanted PostgreSQL-to-Oracle, you could just write the
PostgreSQL parser and use the existing Oracle producer, so half the
work would be done.

Apart from any general input you might like to proffer, I'm eager to
fix upon a good namespace so I can fix it before I've gotten in too
much further.  I thought perhaps the SQL:: namespace, but a friend
also suggested DBIx::.  Since what I've got isn't really related to
DBI[1], I figure it probably more belongs in SQL::.  Also, SQL:: is
less crowded, so I'm hoping my module wouldn't get lost in the
shuffle.  Specifically, I was thinking "SQL::Translator" for the
package name, with all the rest of my modules (Parsers, Producers,
etc.) living under there.

ky

[1] I don't even use DBI to connect to a database -- I only parse text
    files; however, I could see extending this to take connection info
    for a db and grabbing the schema that way, too.

Reply via email to