Migrating database from old software to new software I am a young web developer and I am facing a problem I cannot solve on my own and need some help and/or orientation.

My client has an agenda (Lotus), which is a very old software, and I have developed a web-based agenda (which uses MySQL). What I need to do is to migate all the contact database from the old agenda to the new one.

I managed to export the database from Lotus(old software) in the following formats: ANSII, ASCII, DBASE, VCARD. Which one will be the most useful?

There is another problem, my new database is slightly different (It does not have all the same fields, and, per example, it has another table for other numbers or other e-mail addresses, and some other differences.)

I thought of importing the same exact database (both structure and data) from the old software to SQL, and then, write a .php script whichs converts it to my new structure. (This because I am used to sql and php, and I can't figure out a better way to do it)

Is my idea a good way to do? Can you recommend a better one? How do I import this database to SQL?



EDIT: Answering to Max Vernon, in my new software I am using MySQL database. I am not sure if that was your question, I am a novice to databases and had to google up RDBMS. And to the other question, the ansii and asci backups looks like the table column names between quotes separed by comas, and values between quotes separed by comas

I edited the whole post because it has been marked as unclear.
Create a second MySQL database. This will be used for the migration and then dropped. These are known as staging databases. Make it an exact, table-for-table copy of your source. This way it is easy to export form the source and import into staging without worrying about mapping columns. The documentation will tell you how to load flat files into tables, and what formats it supports.

Once staging is fully populated write however many INSERT .. SELECT statements you need to map staging columns to the new DB columns and copy the data.

Do all this in scripts, not through the UI. Then it will be reproducable, debugable and audited. If you find a problem in the new app you can fix the script and re-run.