How can I update a remote database when the local database records have changed?
<p>The database structure of the remote server is different than the database structure for the localhost so I cannot just synchronize them and/or make a master-slave relation ( replication ).</p>

<p>Suppose remote database(hosted on some webhost) has a table named Employee_123 with the following structure:</p>

<pre><code>id, firstName, lastName, email, salary
</code></pre>

<p>and the local database(hosted on my computer through xampp) has a table named SalaryUpdate with the following structure:</p>

<pre><code>id, email, salary
</code></pre>

<p>Both of the databases have the same records only that the local one does not have the firstName and lastName so it has less information about the record. So for example the records would be:</p>

<ol>
<li>Ron Michigan ron@gmail.com 1200</li>
<li>Rose Paris rose@gmail.com 5000 </li>
<li>Marilyn Monroe marilyn@gmail.com 43000</li>
</ol>

<p>Now what I would like to do is detect when on the local database the records have been altered(changed) and make this modification on the remote server as well. For egg:</p>

<p>On the localdatabase we change the salary of Rose Paris to 7000, this change would be detected and then the salary of Rose Paris from the remote server would also be changed to 7000.</p>

<p>I thought about using triggers, but apparently you can't use them outside your server. </p>

<p>I heard about a possibility to create a federate table on the local database of the remote database and then use triggers to do all the work you need as if all the tables were on the same server, but in xampp there is no federated engine ( I tried to activate it by commenting skip-federated in my.ini and add federated into mysqld section, but then xampp wont let me turn on mysql because it just doesnt exist )</p>

<p>So, my final thought would be to create a java application that would connect to both databases, detect the changes in the local database and make those changes in the remote database as well.</p>

<p>Is this possible? How could I detect record changes of mysql database in java? 
 Also, if there is another way of doing this please explain.</p>