Syncing a table records with a Service response frequently
- by Karthik Dheeraj
I am requesting data from a service whose response in stored in a database.First, I have an empty table, whenever I make my very first request the records from the service comes to my database table.
from now, whenever I make second request, the service will provide me some records which may be same as my first response, may be new records, may be updated records etc.
my query is to how to update my table with respect to the responses coming from the service during my second request on-wards? so that Unchanged records will remain same, New records will be added, updated records will be updated.Do I need to write any stored procedure on my DB or any workaround ?what might be the scenario if I use Nomysql DB's like mongo DB ?
Thanks In Advance.