HelpDatabase Reference › DGTree

DGTree Table

The DGTree table is the DNAGedcom unified, service-independent family-tree store. Each row represents one family tree — a GEDCOM file you uploaded, a tree gathered from a match at FTDNA or MyHeritage, or a WikiTree branch. The companion DGIndividual table holds the people within each tree, one row per person, all linked back to a DGTree row by its Id.

The point of these two tables is normalization. Different services describe trees and people in different shapes; DGTree and DGIndividual flatten them all into one common model so that the People view and the Common Ancestor tools can compare trees across services without caring where each tree originally came from.

Two model classes are not tables: DGPlace and DGMatch are declared in the same source region as DGTree and DGIndividual, but no table is ever created for them — they are model-only/legacy classes and hold no data in the database.

Column Reference

ColumnTypeDescription
Idint (PK)Auto-incrementing primary key. This is the value other tables reference (see Related Tables).
namestringDisplay name for the tree. For a gathered match tree this is the match’s name; for a GEDCOM upload it is the uploaded file name; for a WikiTree branch it is the root person’s id.
treeidstringThe tree’s key. For service trees this is the service’s tree key, share key, or person id; for a GEDCOM upload it is a generated 12-character identifier.
treeurlstringURL of the tree on the originating service, when one exists. Empty for WikiTree and GEDCOM uploads.
basePersonIdstringThe id of the tree’s root/base person. Left empty for GEDCOM uploads.
CreateDateDateTimeWhen the tree row was created (UTC).
UpdateDateDateTimeWhen the tree row was last updated (UTC).
matchIDstringThe encrypted kit/match id of the match this tree belongs to, when the tree was gathered from a match. Not set for GEDCOM uploads.
sourcestringWhich pipeline produced the tree. See “How It’s Populated” below for the set of values.

How It’s Populated

Rows are inserted whenever a tree is brought into DNAGedcom. There are several producers, each writing the same row shape but from a different upstream format:

  • GEDCOM upload — uploading a .ged file creates one DGTree row with name set to the file name, a generated 12-character treeid, and source = “gedcom”. CreateDate and UpdateDate are stamped with the current UTC time.
  • FTDNA — native FTDNA match trees are recorded with source = “FTDNA”, name from the match’s name, treeid/treeurl from the service, matchID from the match’s encrypted kit, and basePersonId from the tree root.
  • WikiTree — WikiTree branches are recorded with source = “WikiTree”.
  • MyHeritage — MyHeritage match trees are recorded with source = “MyHeritage”.

The recognized source values are therefore “gedcom”, “FTDNA”, “WikiTree”, and “MyHeritage”. (Tree-source query filters in the app also reference “Ancestry”, but A* match trees are stored in the dedicated Ancestry_matchTrees table rather than here.)

De-duplication: Before inserting, the app checks for an existing tree with the same source and treeid. If one already exists it is reused, so the same tree is not stored twice.

Related Tables

  • DGIndividual — the people within each tree. Every DGIndividual row links back to a DGTree row through its treeid column, which holds the parent DGTree.Id.
  • Kit_TreeAssignment — assigns a tree to a DNA kit. Its TreeId column holds a DGTree.Id for GEDCOM/FTDNA trees, or the sentinel -1 to mean “use the kit’s gathered match trees” rather than a specific DGTree row.
  • Match_TreeOverride — points a single match at a better tree. Its OverrideTreeId column holds the DGTree.Id of the tree (typically a GEDCOM upload) to use for that match.
  • Computed_CommonAncestors — results of comparing trees across matches. The common-ancestor computation reads DGTree/DGIndividual to find shared ancestors between kits.