Synchronizing Field and Office Databases

This section is of use only to organizations using both Rangecam Field and Office systems.

In the course of time, updates will be required to field and office databases. When that happens, procedures must be in place to ensure that the databases remain in sync.

Whenever feasible, the practice of making the changes in the office, then copying the office database to the field system, should be followed.

One case in which that may be impractical is when information on curves and track points (assets and obstacles) is collected in the field. That information can be recorded directly to the field system database. If it is, it may also be collected as 'raw' data files that can be post-processed, along with profile measurement data, in the office, and if it is, that will normally result in the desired level of consistency between field and office. If that is not done, however, and the curve and track point information is collected to the field system database only, it may be desirable to replicate the field system database to the office, rather than the other way around.

But not the whole database! An office system database for a territory will typically grow to include several years of profile data. Field system databases do not require historical profile data, and normally do not include it. If the entire field system database were copied over the office system database, the historical profile data would be lost.

Rangecam provides the capability of copying just that part of the database that contains relatively permanent information, from field to office, or from office to field. That includes subdivisions, classifications and classification criteria, rail types, distances between mileposts, information on curves and obstacles (track segments and track points), and tonnage records. That information is stored in the permrail database. Information derived from data collection runs is stored in the measrail database.

The permrail database is self-contained. It consists of two files:

The measrail database also consists of two files:

The measrail database is not self-contained. It includes references to tables in the associated permrail database. For example, each run record in the measrail database refers to a subdivision in the permrail database, each profile record in the measrail database refers to a rail type and a rail classification in the permrail database, and so on. Reference is made not by name but by number, and in most cases the number is not visible to the user of the software and cannot easily be changed. For this reason, consistency between the measrail and permrail databases is all-important!

The permrail database will usually be much smaller than the associated measrail database, once data collection runs have been read in. The permrail database is normally small enough to send by email.

Rangecam makes it possible to copy a permrail database from field to office and to use it with a measrail database that already contains data. However, it is the data administrator's responsibility to ensure that the databases are consistent, which they are unlikely to be unless proper procedures are put in place and strictly followed.

The following scenario will work: the original permrail database for a territory is set up in the office and copied to the field. The field system operators make no updates to the subdivision, rail. classification, and rail classification database tables. A master run is done in the field, collecting curve and obstacle information to the field system permrail database. This information may also be collected as raw data files to be shipped back to the office for post-processing. But suppose that it is not. An ordinary data collection run is done, and the data is shipped back and post-processed. Now the office database contains run data but no curves and obstacles, and the field database contains curves and obstacles but no run data. At a later time, there is a requirement for curves and obstacles in the office. Because procedures have been followed to ensure data integrity, the permrail database can now be copied from field to office, and used with the measrail database that is already there.

Don't try this if you are tired or not quite sure. And make a backup first!

A more usual scenario is for all updates to the permrail database to originate in the office and be copied to the field. The separation of the permrail and measrail databases makes this convenient.