database - Over Web Service, Update A Table From Another Same Table Which Is In Different Location -
I have two separate databases, one of them is the original database and the second cache database.
This database is in a different location. In one day, I have to update the cache database from the original database and this update should have progress with the web service I'm working on the original website machine.
I can clear all the cache DB tables and insert basic data in each progress. But I think there is a bad scenario. So how can I progress with this efficiency? And you have a suggestion.
I'm pretty sure there are DB synchronization techniques, but because you already have the requirement, I recommend using a change-log
Therefore, you have a "CHANGE_LOG" table on which you insert rows while doing "write" on your table (INSERT, UPDATE, DELETE) We do. In one day, you can apply these changes one by one to Cash DB.
After deleting a change, it is ok to delete the log-off, but you can also provide "version" in DBS. Therefore, each change version number in DB will be increased. It can be used to manage more than one checkdie.
For example, to provide additional assurance, you can trigger a cache DB which increases its own version number. In this way, your process can check a cache DB and it will be known that Master DB (in this way, a new cache DB, to update a crash cache DB, keeping the up-to-date date even easier Without transformation should be implemented.).
Note that you will need to purify the change log periodically.
Comments
Post a Comment