How do I sync an offline database to an online one?

Asked

Viewed 1,190 times

1

I have two identical databases, one offline and one online.

In every field of a table I have a column called online with values 0 (did not send the data) or 1 (already sent the data).

Usually I check if there are any fields in my table with the column online with value equal 0, and if you have, I send the registration to the online bank and change the value to 1.

It works very well like this. The bigger question is if I have two people using the system.

How can I send data of the two clients to the online database and make each of the customers receive the data that the other sent?

1 answer

1


Hello. If I understand correctly...I can say that using the database replication feature is the best alternative, I’ve been through a similar situation, where parts of the data should be in several different locations, so using the conventional architecture (Client/Server) would overload the network... All banks already support replica, pôstgresql, Oracle, sql server..... Trying to do this on the basis of code is headache in certain.... It is also possible that your problem can be solved using the Sass...(Use Web Api for example..Rest full) Let the database work on this... I’m sorry I can’t help you by posting code, but that’s what I could infer from the context.

Hug.

  • usso mysql, have some material you can refer me to search?

  • 1

    A wide range of information is available at google, but consider contacting a Mysql professional to solve the problem permanently and professionally. I say why it is possible that the time of learning gives you so much anger for the countless attempts and error that you will eventually throw away a solution and keep it as it is. (I’ve been there... rsrsr) 1 - https://www.youtube.com/watch?v=qQnICp2vP8w 2 - https://www.youtube.com/watch?v=fUrKt-AQYtE 3 - https://dev.mysql.com/docrefman/5.7/en/replicationhtml.html.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.