Replication

If you wish to work with your data on a local database (called subscriber), e.g. on your laptop, and this data should be synchronized with a database on a central server (called publisher), you may use the replication function of DiversitySamplingPlots. To install the database on your local computer see the database installation section.

To use the replication function you must be assigned to the roles Replicator or Administrator.

Add Publisher

To define a publishing database, choose Data -> Replication -> Add Publisher from the menu. A window will open where you can choose the publisher. When the publisher is set, you may transfer data between your local database (subscriber) and the publisher. This function is only available for administrators.

 

Remove Publisher

To remove a publisher from the list, choose Data -> Replication -> [Publisher] -> Remove from the menu (where [Publisher] is the name of the publishing database on the publishing server). This function is only available for administrators.

 

Clean database

Initially you may want to remove all previous data from your local database (subscriber). Choose Data -> Replication -> Clean database ... from the menu. A window will open where you may choose the ranges which should be cleared:

Choose the data ranges you wish to clear and click on the button. All tables which contain data will be listed as shown below.

 

Choose the tables which should be cleared and click on the Clean database button. Please keep in mind that you can not delete data from a table as long as there is data in a related table depending on the data you wish to delete. The sequence of the tables is organized to avoid these problems.

 

Download

To download data from the publisher choose Data -> Replication -> [Publisher] -> Download from the menu (where [Publisher] is the name of the publishing database on the publishing server). A form will open as shown below. Choose the project of the data and the data ranges (see above) which you wish to download. Click on the button to list the tables containing data. To start the download click on the Start download button. With the Force download, ignore conflicts option you can decide whether or not the data in your local database (subscriber) should be checked for changes before you download the data from the publisher.

If the selected project does not exist in the Subscriber database, you will be prompted to create it automatically.

 

Merge

To merge data from your local subscriber database with the publisher, you must first select a project in the Query section of the SamplingPlots main window. Then choose Data -> Replication -> [Publisher] -> Merge from the menu (where [Publisher] is the name of the publishing database on the publishing server). According to the download, choose the data ranges and click on the button. To start the merging, click on the Start merge button.

 

Upload

To transfer data from your local subscriber database to the publisher, you must first select a project in the Query section of the SamplingPlots main window. Then choose Data -> Replication -> [Publisher] -> Upload from the menu (where [Publisher] is the name of the publishing database on the publishing server). According to the download, choose the data ranges and click on the button. To start the upload, click on the Start upload button. With the Force upload, ignore conflicts option you can decide whether or not the data on the server (Publisher) should be checked for changes before you upload the data from your local database (Subscriber).

 

Conflict

If the data transfer was successfull, the numbers of the transfered data will be shown as below.

During the download or upload a conflict may occur, if the data has been edited in both databases. This will be indicated as follows.

Click on the button to open a window where you can choose between the two versions of the data as found in the publisher and the subscriber database.

The conflicting columns are marked red. For text values the program will create a combination of both values (see above) for a merged version of the data. Choose the prefered version and click Solve conflict button. If you can not solve a conflict, use the Stop conflict resolution button respectively.

 

Report

At the end of each transfer a report will be created with a summary for every table which has been included.