jbanks
jbanks

Reputation: 193

MySQL Commands into .DBF Tables

I am currently writing a database system in Java that writes and reads to a MySQL database hosted on XAMPP. The system is fully up and running using MySQL commands to select, update, add, delete etc.

The issue is that we are currently using an old database written in Visual FoxPro that has its tables stored as .DBF files. Rather than taking a few years to get a fully working system and then moving everybody over to the MySQL system at once, we would like to have both systems working concurrently with gradually more people beginning to move over and use the MySQL system.

This is where I am having issues. Is there a way to both update a MySQL table and .DBF file when a job is added through the Java program? Is it as simple as using a MySQL command to directly modify the file? I understand there could be possibilities in Python or PHP however I have never learnt either of these languages and would prefer an easier solution.

Upvotes: 1

Views: 347

Answers (1)

Tamar E. Granor
Tamar E. Granor

Reputation: 3937

Trying to keep two databases in synch is a bad idea. If you miss something and the data no longer matches, how will you know which is right? (A man with one clock always knows what time it is; a man with two is never sure.)

If the existing system is complex enough, maybe consider moving one module at a time.

If the existing system is well-written, it might be possible to switch it to work with MySQL without too much effort. That said, my experience is that very few applications are well enough designed and written to make that a simple task.

Alternatively, you might set up your new system with some kind of wrapper that talks to the existing DBFs until you're done and then can easily switch to MySQL.

Upvotes: 3

Related Questions