Topic: How to synchronize mysql depending on a DB sqlite.
Good afternoon respected . I write here the first time. I a beginner in sql.
Is available sqlite in which there are 3 tables. I should copy them in two tables mysql. In one of tables "event" are permanently added on 10 records at an o'clock. I interrogate sqlite in 30 minutes Prompt what the algorithm of copying is necessary?
I represent such algorithm for the table "event":
1. Check mysql.event, whether the empty table.
2. If yes to copy all table from sqlite.event in mysql.event.
If the table is not empty, search of new events (lines), across the field data (in which date always increases). Request in mysql.event single line with the latest date. And comparing with sqlite.event (those events which are higher date from mysql.event to copy in mysql.event)
I write on node.js. units I use mysql and sqlite3.
Faced an error at which all table sqlite.event 3 or 4 times in mysql are copied.