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.

<p>


==Merging the files into a database  ==

<ul>

<li>
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:

<pre>
     gwc bar.gw smith.gw foo.gw -o mergedbase
</pre>


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:

<pre>
     gwc bar.gw -sep smith.gw -sep foo.gw -o mergedbase
</pre>

<br>

See also [[[merge/Merging databases]]].

<p>

<li>
Now you can access and update the database "mergedbase". {GeneWeb}
will remember which files the data originates from.

<p>

<li>
Inside the database the sequence <TT>";opt=from"</TT> can be added to the address to see from
which file the data originates. For example:

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

Note: It works only for persons with families.
</ul>


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

<ul>

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

<p>

<li>
To recreate the source files, in the window of interactive commands, type:

<pre>
     gwu mergedbase -odir outdir
</pre>

<li>
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).

<p>

<font color=#ff0000>If the command gwu is printing out source information</font>

<p>

<li>
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.

<p>

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

<pre>
     gwu mergedbase -odir outdir > new.gw
</pre>

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

</ul>

<p>

<br>
<center>Return to [[[diruse/Directions for Use]]]</center>

