Sample Header Ad - 728x90

Sync different table structure in MySQL Database

0 votes
1 answer
229 views
I have two table in different database host host. activity_table in **Host A** and presence_table in **Host B**. presence_table used by binary app where i don't have access to the source code but i have full access to the database. the presence_table table have this following structure | column | type | | -------- | -------------- | | id | integer | | finger_id | varchar | | time_in | timestamp | | time_out | timestamp | | ... | ...| **Example record** | id | finger_id | time_in | time_out| |-|-|-|-| |1|12a766d|2022-08-01 12:32:01|2022-08-01 20:00:03| The activity_table is used by app which we are developing with this following structure | column | type | | -------- | -------------- | | id | integer | | employee_id | integer | | description | text | | activity_time | datetime | | created_at | timestamp | | updated_at | timestamp | **Example Record** |id|employee_id|description|activity_time|created_at|updated_at| |-|-|-|-|-|-| |1|21|Enter the office|2022-08-01 12:32:01|2022-08-01 12:32:02|| |2|21|Exit from office|2022-08-01 20:00:03|2022-08-01 12:32:02|| and of course i have employee_finger_table to pair employee with finger. My question is how to automatically sync the presence_table to activity_table so when there is new record or updated record in presence_table synced to activity_table based on above example ? is there any tools or idea to address this problem ?
Asked by Abu Dawud (1 rep)
Sep 5, 2022, 01:38 AM
Last activity: Jun 13, 2025, 02:04 PM