We are building an online appointment system for a client (hospital) which is located in multiple locations. All the locations are interconnected and are accessing the application installed locally connected to the database server in the main office over MPLS. There are sometimes where the MPLS link goes down between the main office and the branch office. The System should take the Appointments into the Local Database at the branch office and as soon as the connection comes back the data from the Branch office should be synchronized with the main office.
Also the doctors in various locations use various mobile devices and tablets with Android, IOS and Windows OS.
The doctors can also view their own appointments, book an appointment for their patients next visits or refer the patient to another doctor using the appointment engine by booking the appointment.
We need to build an application, which can work in an offline and online mode for the Branches as well as the Doctors mobile devices and tablets with an option to manage and resolve conflicts at the application level.
Please suggest us the best Database to use which can be a good solution for the above scenario.
Single type database cannot support such a distributed system.
It will depend upon amount of data , indexing, other features.
For eg: For MPLS you should go with Oracle or Microsoft SQl server as it will have enormous amount of data with fast indexing.
For the respective data you can go with freeware likes Mysql and on mobile platform you can go with light version of DB like SQLite.
As far as data synchronization between DB at branch level and MPLS is concerned you can use available JAVA replication frameworks like Daffodil Replicator (E) and SymmetricDS. These supports various features like heteregenous replication,security conflict detection and resolution. refer here Strategy for Offline/Online data synchronization
For data synchronization between mobile DB and MPLS I am afraid you have to built your custom middleware for replication and synchronization.