| # GeneWeb - Merging databases

This part indicates the procedure to you to merge databases.

If you are not a specialist of interactive commands, use the program gwsetup which tells you how to do that (you can then ignore the rest of the present chapter).

The merging of databases is done in two steps:

- First gathering the two bases into a new one.

- Second, merging the persons.

### First step: concatenation of bases

That can be done only in an interactive window (see "How to start with GeneWeb").

- If you have a base called "foo" and another which is called "bar", extract these two bases as source files with the command "gwu". Type:

           gwu foo > foo.gw
           gwu bar > bar.gw

- Create a common base "base". Type:

           gwc foo.gw -sep bar.gw -o base

  The option "-sep" allows to treat "bar.gw" separately: if a person in "bar.gw" is already defined with the same key (first name/surname/number) in "foo.gw", the number of his key is automatically shifted to avoid the conflict.

### Second step: merge of persons

You now have a database "base" holding "foo" and "bar" with some persons recorded twice.

You will be able to merge these people in your navigator. If "gwd" is not launched, launch it.

Then apply persons merging, which is in the part "How to make modifications in the database" (forget the comment about the fact that it is not about "databases merging").

### Final cleaning up

At the end of merging, it is wise to make a final cleaning up of the base. Indeed, when persons or families are removed (what occurs when merging are done), the space of the removed persons and families is not recovered. In particular, the welcome page always indicates the same number of persons.

To do the cleaning up of the base "base" (you can make at any time, and even several times), use again an interactive window. Type:

         gwu base > base.gw
         gwc base.gw -o base

Note that if you want to scratch the old base "foo", type simply "-o foo -f" in this second command:

         gwc base.gw -o foo -f

Return to Directions for Use

Copyright (c) 1998-2005 INRIA - GeneWeb