Skip to content


Category: Genealogy

In my previous post in this series, I introduced the Family Traces family tree application. Now, I am going to go through the importing of a gedcom file.

Firstly, what is a gedcom file?

The gedcom file format is a text file format for the transmission and storage of genealogical data, created by the Church of the Latter Day Saints for their genealogical projects.

A standard gedcom file has a header section, individual records, family records and notes. The various records are linked to each other by ids, in the format of @I1@ for an individual record for example. For a full spec of the gedcom format, have a look here.

Here is a sample gedcom file

1 SOUR FamilyTraces
2 NAME Family Traces
2 CORP Serge Meunier
1 DEST Standard GEDCOM
1 DATE 2010/02/16
2 VERS 5.5
0 @I1@ INDI
1 John/Smith/
2 GIVN John
2 SURN Smith
2 DATE 15 dec 1950
1 FAMC @F2@
1 FAMS @F1@
0 @I2@ INDI
1 Jane/Doe/
2 GIVN Jane
2 SURN Doe
1 FAMC @F-1@
0 @F1@ FAM
1 HUSB @I1@
1 WIFE @I2@
1 CHIL @F3@

Before we start processing the file, we need to have some data structures to hold the data from the file.

    public struct GedcomHeader
        public string Source;
        public string SourceVersion;
        public string SourceName;
        public string SourceCorporation;
        public string Destination;
        public string Date;
        public string File;
        public string CharacterEncoding;
        public string GedcomVersion;
        public string GedcomForm;

    public struct GedcomIndividual
        public string Id;
        public string GivenName;
        public string Surname;
        public string Suffix;
        public string Sex;
        public string BirthDate;
        public string BirthPlace;
        public string Occupation;
        public string Description;
        public string Nationality;
        public string DiedDate;
        public string DiedPlace;
        public string DiedCause;
        public string ParentFamilyId;
        public string SpouseFamilyId;
        public ArrayList Notes;

        public GedcomIndividual(string id)
            Id = id;
            GivenName = "";
            Surname = "";
            Suffix = "";
            Sex = "";
            BirthDate = "";
            BirthPlace = "";
            Occupation = "";
            Description = "";
            Nationality = "";
            DiedDate = "";
            DiedPlace = "";
            DiedCause = "";
            ParentFamilyId = "";
            SpouseFamilyId = "";
            Notes = new ArrayList();

    public struct GedcomFamily
        public string Id;
        public string HusbandId;
        public string WifeId;
        public string MarriageDate;
        public string MarriagePlace;
        public ArrayList Children;
        public ArrayList Notes;

        public GedcomFamily(string id)
            Id = id;
            HusbandId = "";
            WifeId = "";
            MarriageDate = "";
            MarriagePlace = "";
            Children = new ArrayList();
            Notes = new ArrayList();

    public struct GedcomNote
        public string Id;
        public string Text;

        public GedcomNote(string id)
            Id = id;
            Text = "";

We also need a set of enumerations we will use to keep track of where we are in the file. This is important because the meaning of a field in the file is dependant on the place in the file it occurs, so we need to be aware of what we need to do at all times, but more on that later.

    public enum GedcomRecordEnum

    public enum GedcomSubRecordEnum

The full source is available here.
Now we need to get to parsing the file, which is covered in Importing a Gedcom file – Part 2


I love being able to trace my family tree, and have used several good genealogy applications which I have found very useful, including Family Tree Legends and Family Tree Builder. The problem I have though, is that they do not always contain everything which I am looking for, so I decided to write a family tree application to plug in the holes.

Family Traces, which you can download the full source for here, is a fully functional, albeit bare-boned family tree application, which can import and export Gedcom files, calculate ancestors and descendants, and allow you to edit the family tree. Everything is there for a starting point, from where you can develop further reports and functionality.

All of that will come in later posts in this series though. For now, I am going to focus on the core of the application – the data layout. This layout is created within an Access database included with the application.

The two main components of any family tree are individuals and families.

Starting with the individual, each person in the family tree will have a record in the database. The most important data we need for an individual are:

* Individual Id
* Name
* Birth date
* Birth place
* Death date
* Death place

These fields are vital in determining if the person we are looking at is the same person listed in genealogical records, such as birth certificates, genealogical lists etc.

Now data collection for an individual is not restricted to these fields, and you are free to create as many fields as your want for things like physical attributes, cause of death, photos and general notes.

Moving onto families now, a family is what connects different individuals together into a tree.

The main family record will have

* Family Id
* Husband Id
* Wife Id
* Marriage date
* Marriage place

This links the husband and wife individual records into the family, and allows you to track the marriage date and place, which is also important in genealogical research, as it may provide crucial hints to the individuals, particularly if the birth and death dates of the individuals are unsure.

The last thing we need is to be able to link individuals as children within a family, and this is done using a separate table, which keeps track of the family id, as well as the individual id of the child, and each family can have multiple individuals attached to it as children.

In the database setup for the application, I also included a field in the individual record for the parent family record, which makes it easier to link the individual to a family as a child when processing the tree. This means that we are able to find the family that the individual is a child of without having to check the family records directly.

Now that is all there is to the core of a genealogy application, so feel free to play around with the application, and I will explain more about how the gedcom file format works in the next tutorial…


For 2 years now I have had suspicions that there is a royal link in my ancestry, through Jacques de Savoye, who I spoke about in a previous blog post, who settled in the Cape Colony in 1688. There is almost certainty that he descended out of the aristocratic de Savoye family from France, but I have been unable to prove this link.

My aristocratic blood, however, comes from another source. I managed to trace the lineage of another one of my ancestors who settled in the Cape. That is Engeltjie Quint, who married Nicolaas Laubscher.

She is descended, through her mother, Wilhelmina Verweij, from a man called Jan van Hattem, who lived in the late 1300′s, who was the bastard son of a Dutch nobleman, Reinoud III van Gelre. From here on out, the ancestry looks like a who’s who of medieval history. I ma trace lineages to Atilla the Hun, Charlemagne, King Edward II of England, Alfred the Great, and many many more.

For those that are interested, here is an updated GEDCOM file containing my research.


South Africans are a bunch of avid genealogists. So much so, that the family trees of the early settlers is very well established, and for most of the white (and coloured) families in South Africa, the kinship can be proven easily and most South Africans have common blood. Heck, even I am provably related (albeit distantly) to just about every Afrikaans person in the country.

Now this is all very good for working out genealogical links, but South Africa in general has a rather large genealogical brick wall, and that has to do with beginnings of the Cape colony.

South Africa is a relatively new nation, only first being settled by European colonists at the Cape in 1652 – just over 350 years ago. And, yes, I know there were indigenous people here before that, but they play little part in my story, since I have found no trace of them in my ancestry.

South African genealogy is very well established up to the founding of the colony, but then the records go silent.

South Africans seem to be content in finding the “stamvader” (or “stammoeder”) – which roughly translates as “founding father” – which would be the first person of a particular lineage to immigrate to South Africa. So for example, one my ancestors, who is also a “stamvader” is Jacques de Savoye, who came to the Cape in 1688 with his family.

Now it is all very well and good knowing that, but then how do you go back further? Most of the settlers came from Germany, the Netherlands, France and later England, but most of their genealogies are not very well known.

There are exceptions though, such as the du Plessis’s, whose ancestry can be traced to the French aristocracy (and from there to royalty and nobility throughout Europe), and the Laubschers, who hail from Switzerland. Quite a few more can be traced back two or three generations in their native countries, but for the vast majority, the trail stops at the moment they stepped on South African shores.

Is the problem the fact that obtaining records for these people here in South Africa is difficult, since researching these families would requite digging through genealogical records scattered across Europe, or is it just that knowing who their “stamvader” was is good enough for most South Africans?

The answer to that, I do not know…


Today is Heritage Day in South Africa. While also being National Braai Day, and a great public holiday in which I can sit at home and watch the South African cricket team play New Zealand in the ICC Champions Trophy, the day is meant to be a day where South Africans celebrate our heritage.

I must be honest and say that I have never been all that much into our national identity because, you see, while I was born here, and am at least half South African, most of my connections lie elsewhere in the world.

My heritage is varied. My father was Belgian, while my mother is a bit of a melting pot of cultures. I’ve got Jewish, German, Scottish and Afrikaans blood flowing through my veins thanks to that branch of my ancestry. And even the Afrikaans ancestor of mine is a mix, with French, Dutch, Swiss and even a few Indian slaves thrown in.

On the flip side, even though I have just said that I don’t always feel like a true South African, thanks to my one Afrikaans Great-Great Grandmother, I am essentially a cousin (albeit distant) of almost every single person in South Africa with any Afrikaans ancestry, as the genetic pool of the early settlers in South Africa was rather small.

For the interested genealogists out there, here is a link to a Gedcom detailing my ancestry, which at present contains almost 11000 people.


One of my favourite hobbies is genealogy. I just love the thrill of tracing my ancestors through the twisted channels of time. It gives me a completely different perspective on the world.

For one thing, I am related, albeit distantly, to just about every Afrikaans person in South Africa, since I have been able to reliably trace my ancestry to several early settler families in the Cape, including the Maree’s, van der Merwe, Loubser, de Savoye, Snyman and several more. Just about every white South African whose family has been in SA for at least several generations has a very good chance of also being related to at least one of them.

Through a rather more unreliable link, although not unlikely, I have been able to trace my ancestors through the de Savoye line to the French aristocracy, which in turn relates me to just about every royal family in Europe and several relations in Asia and China too, from the Huns, Greeks, Indians, French, English, Germans, Egyptian pharouhs and many more.
continue reading…