GeneWeb - Keeping data divided inside a database

| # GeneWeb - Keeping data divided inside a database

If you have received GEDCOM files or information from other researchers, or you want to keep your database divided in several different files, but you only want to access one database, GeneWeb can do that for you.

### Merging the files into a database

- If you have three source files "bar.gw" "smith.gw" and "foo.gw" you want to keep divided. Launch a window of interactive commands and type:

           gwc bar.gw smith.gw foo.gw -o mergedbase

  It may happen that gwc displays errors, because persons are defined twice in "bar.gw" "smith.gw" and "foo.gw". To fix that, gwc has an option "-sep" to automatically shift the numbers of the persons to avoid conflicts. Do:

           gwc bar.gw -sep smith.gw -sep foo.gw -o mergedbase

  See also Merging databases.

- Now you can access and update the database "mergedbase". GeneWeb will remember which files the data originates from.

- Inside the database the sequence `";opt=from"` can be added to the address to see from which file the data originates. For example:

           http://machine:2317/mergedbase?i=357;opt=from

  Note: It works only for persons with families.

### To recreate the source files from the merged database

- If the directory "outdir" doesn't exist, create it (with the command "mkdir").

- To recreate the source files, in the window of interactive commands, type:

           gwu mergedbase -odir outdir

- In the directory "outdir", the three source files "bar.gw", "smith.gw" and "foo.gw" should now have been created. If you have updated the database these source files have also been updated (i.e. they are not the same as those you started with).

  If the command gwu is printing out source information

- Then you have added persons that GeneWeb can't decide in which source file they would be in (new persons that isn't related to the ones from the source files), then GeneWeb will direct these persons to the window of interactive commands.

- To save also these new persons in the source file "new.gw", type:

           gwu mergedbase -odir outdir > new.gw

- The content in "new.gw" can then be moved into one of the other source files with a text editor.

Return to Directions for Use

Copyright (c) 1998-2005 INRIA - GeneWeb