Data Replication
[Previous] [Main] [Next]

Data Replication

As noted earier there is a 35 (plus) specification document describing the JGuiGne Replication system.
This is a full system and be used by sites that don't otherwise use JGuiGen.
- JGuiGen Replication

Replication alone is not enough!

When you have remote sites that must stand alone (satellite offices, road warriors, sites with intermittent Internet connections, etc.) the usual solution is to replicate the data between sites. This may be as crude as retyping data or as complex as Oracle's Replication System which requires experienced Data Base Administrators at all of the sites.

JGuiGen has a built-in replication system that is much better than retyping data, but is not as "strong" as the systems developed by major database venders.

Having remote sites and evolving software means that you must take care of five major concerns.

1.Initial Distribution of software and data - We will be using JAWS, but there are other options (such as the software distribution system developed by the Eclipse project.)  
2.Updating the software - JAWS can do this quite nicely, but it cannot update the schema in existing database at the remote sites.  
3.Updating the schema of the remote databases to include changes required by "new" versions of the software.  
4.Running one-time procedures required by updated software and modified data schemas.  
5.Verifying the accuracy of replicated data.  
The JGuiGen Replication system addresses all five of these concerns.


There is one table (JGReplicate) that holds the infromation relevant to the JGuiGen Replication system. It contains site records (on record per site), a master record for each site and table records that describe each table to replicate.

We use this system to populate databases from the HSQL database that ships with JGuiGen. If you wish to use JGuiGen with another database - say mySQL, you need to move some data from the HSQL database to you mySQL database. In this case the JGReplicate table already exists.

All you do is the following:

·Edit the JGuiGenIni.xml file and enter the JDBC information about you new database system. This will be the LOCAL system. Leave HSQL as the "Primary/Host" system.  

·Use the scripts in the /sql folder to insert four tables in your msSQL database.  
·Data_Dict - the data dictionary table. This is required by both JGuiGen and JGReplicate  
·JGuiGen-I18n - this contains internationalization key/prompt values in several languages  
·Userlogdata - This is used by the log in system, storing user information about prefered borwsers and storing queries and reports generated inside JGuiGen.  
·JGReplicate - the replication driver.  

·Make sure that the dataase user name and password you put in JGuiGenIni.xml will default you to the database you want to use.  

·Run JGuiGen --> Management --> Replicate  

If the connections have been made properly, the the tables are replicated.