General HydroStatics
Ship Stability Software
Command of the Week
(New or interesting aspects of GHS that you may not know about)

DB LocateDB
(Requires GHS version 17.00 or later)

Someone asked: "If the Data Base is located on a network drive, how can various users connect their machines to it if they have already started a Data Base folder locally?"

Answer: On each local machine use DB LocateDB "path", where "path" is the path to the DB folder on the network drive. If "path" is omitted, help is provided:

Then if you continue you get:

Note that this does not touch your original local DB folder; it only redirects GHS to use the new location for future DB operations.

In the real world things are seldom simple, so we anticipated this question:

Q: What if various users want to merge their local DB data to the network DB folder?

A: It turns out this is not difficult, thanks to the design of the Data Base which avoids using index files. Within the master DB folder you will find a Ships subfolder and within that are subfolders bearing the names of Geometry Files they are associated with. All you need do is copy or move your local Ships subfolders into the network DB Ships folder. That's all it takes to merge the GF-specific data. Merging Project folders is easy too: simply copy or move the contents of your Projects subfolder in your local Data Base to the network.

Q: What if there are duplicate subfolder names -- like the same Geometry File name in the Ships subfolders?

A: If two different Geometry Files use the same name, then one of them will have to be renamed and the Ships subfolder renamed accordingly. If it is the same Geometry File, then you have to choose which Ships subfolder to preserve because those subfolders cannot be easily combined.

Q: But what if Geometry Files have been stored in those subfolders?

A: No problem. The stored Geometry Files use a generic name.

Q: So we don't have to change anything within a particular Ship's subfolder or within a Project subfolder?

A: That's right.

Q: What if there are two Project subfolders that have used the same name and we want to keep everything from both under the same name. Can they be merged?

A: Yes. But if there are duplicate file names you will have to rename one or the other.

Q: How will DB Proj know that there are new files?

A: DB Proj scans the project folder each time it is executed.

Q: What about report files?

A: Simply copy or move the contents of your local Reports subfolder to the new folder.

Q: What if two reports have the same name?

A: The chance that they will have the same file name is minuscule because the file names include the date and time of creation down to the second.

Q: If it's so easy, why not provide a DB function to automatically merge two Data Base folders?

AQ: If we provided one, would you use it?

QA: We'd be tempted, but probably would like to monitor the process in case there are conflicts.

A: DB MoveDBTo is protected against someone trying to use it for that purpose.

Q: Then what is MoveDBTo good for?

A: If you simply moved the DB master folder to a new location, GHS would not know where to find it. So DB MoveDBTo takes care of that:

Q: Then does DB BackupDB simply make a new copy without connecting GHS to it?

A: Yes.

The GHS Data Base was designed to be robust. Since it does not use index files to locate its elements, there is little chance of it being corrupted. Nevertheless, backing up data is always a good idea.

Making a backup copy of your GHS Data Base is a simple process. You need not use DB BackupDB. Any copy operation that copies an entire folder and all of its subfolders and files will work just as well.

Questions, comments, or requests?
Contact Creative Systems, Inc.

USA phone: 360-385-6212 Fax: 360-385-6213
Office hours: 7:00 am - 4:00 pm Pacific Time, Monday - Friday

Mailing address:
PO Box 1910
Port Townsend, WA 98368 USA

Click here for an index to this and previous COWs