tags:

views:

63

answers:

2

Hi,

I have a bunch of data from a scientific experiment stored in a MySQL database, but I want to use MongoDB to take advantage of its map/reduce functionality to power some web charts. What is the best way to have new writes to MySQL replicate into Mongo? Some solution where I inspect the binary MySQL log and update accordingly, just like standard MySQL replication?

Thanks! Alex

A: 

I am not familiar with MongoDB but my quick look shows it is incompatible with mySQL so unless someone has written something to import form mySQL you are out of luck.

You could write your own import function.

assuming your mySQL tables use an incrementing unique 'id' field you could track the last row in mysql and then send it to mongodb when it changes.

Alterations and deletions would be much more difficult to deal with. if this is important then inserting the data at the source is probably the best bet.

Do you need to insert the data into mysql at all? could you do it all in mongodb and save all the trouble?

DC

DeveloperChris