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.

| improve this answer | |
  • Thank you very much for your answer. That is the idea I had. However, how can I import it to mySQL? in phpMyAdmin there is no option for importing any of these formats I have. Where should I look for? – Pablito Aven Oct 3 '15 at 15:55
  • I'm not at all sure what you mean by ANSII and ASCII formats. A moment on Google (sorry "Alphabet") showed this and this. If neither of those works you should be able to write a PHP script to read, unstring and load a flat file. – Michael Green Oct 5 '15 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.