Some remote data organized in a Mysql database should be replicated locally.

Only some tables and only a few rows inside those tables are important locally, so it is overkill to create a complete replica on site and synchronize it. Remote data will be transferred in json format and will be available locally with some delay.

What alternatives I have to store the received json objects ?

They are supposed to be no more than some hundreds a day, so they could be persisted on the file system too. Don't think it is a good idea create a database with the same table structure of the remote one relaxing some foreign key constraints for the data which don't need to be replicated.

1 Answer 1


Why not use Sqlite?

It's pretty much MySql but limited to a single database (oversimplification). It exists as a single file on you system, so is easy to backup.

Unless you have some exotic database, you can use the same tables in each, and reuse SQL queries already written for the MySql code locally with Sqlite.

It is probably dependant on your particular use case, but that's the way I would go.

If you don't want to do that, then NoSql databases will store JSON directly onto the file system. E.g MongoDb

MongoDB is a document database, which means it stores data in JSON-like documents. We believe this is the most natural way to think about data, and is much more expressive and powerful than the traditional row/column model.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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