I have local and remote database.
The local database is a replica of remote database.
I have to insert new records from remote database into local database.
There are 14 tables in remote database, so i need to track changes in all 14 tables.

I know I can select every table in remote database and check if record exists in local database if not then insert it.

Is there another way to do it? In java maybe?
What approach would be the best?