How to synchronize an offline database with an online database?

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).

I usually check if there is any field in my table with the online column with a value of 0, and if so, send the registration to the online bank and change the value to 1.

It works great this way. The biggest issue is if I have two people using the system.

How can I send data from two customers to the online bank and have each of the customers receive the data the other one sent?

    
asked by anonymous 20.02.2017 / 23:44

1 answer

1

Hello. If I understand ... 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 places, so using the conventional architecture (Client / Server) would overload the network ... All banks already give support to replica, póstgresql, Oracle, sql server ..... Trying to do this at the base of the code is headache right ..... It's also possible that your problem can be solved using Sass architecture ... (Use Web Api for example..Rest full) Let the database work on it ... the designers have already given themselves to this work ... rsrs I'm sorry I could not help you by posting code, but that's what I could infer from the context.

I hug.

    
21.02.2017 / 01:11