HelpDatabase Reference › Ancestry_matchTrees

Ancestry_matchTrees Table

The Ancestry_matchTrees table stores the individual people who make up a match’s family tree. Each row is one person — an ancestor in the direct pedigree of a DNA match (or of your own kit). The rows for a single match together reconstruct that match’s tree as a pedigree, linked parent-to-child through person IDs.

The table is populated only when tree gathering visits a match’s compare page. A matches-only gather leaves it empty.

Column Reference

ColumnTypeSourceDescription
Idint (PK)AutoAuto-incrementing primary key
matchidstringCompareThe GUID this tree belongs to. Normally the match’s GUID; for your own tree it is your kit’s GUID. Stored uppercased.
surnamestringComparePerson’s last name (from the pedigree person’s lastName)
givenstringComparePerson’s first / given name (from firstName)
birthdatestringCompareBirth date as A* supplies it (free-text, e.g. a year or full date)
deathdatestringCompareDeath date as A* supplies it (free-text)
birthplacestringCompareBirth location name
deathplacestringCompareDeath location name
relidstringCompareAhnentafel position within this person’s pedigree. The root person is 1; a person’s father is 2×relid and the mother is 2×relid+1. Lets you place each person in the tree without following the ID links.
personIdstringCompareA*’s person ID within the tree. Unique per person within a match’s tree.
fatherIdstringComparepersonId of this person’s father (links to another row), or null
motherIdstringComparepersonId of this person’s mother (links to another row), or null
subjectGenderstringCompareGender of this person within the pedigree: “M” (a father), “F” (a mother), or “U” for the root person
sourcestringAppOrigin of the record. Always “Ancestry” for these rows.
created_datestringAppDate the row was written (yyyy-MM-dd)
loginUsernamestringAppDNAGedcom username who gathered this data
syncstringAppSync status flag (written as “0”)
birthdt1datetimeDerivedParsed start of the birth-date range. Legacy/derived column — not populated during normal tree gathering.
birthdt2datetimeDerivedParsed end of the birth-date range. Legacy/derived — usually empty.
deathdt1datetimeDerivedParsed start of the death-date range. Legacy/derived — usually empty.
deathdt2datetimeDerivedParsed end of the death-date range. Legacy/derived — usually empty.
The four *dt1 / *dt2 columns exist to hold machine-parsed date ranges derived from the free-text birthdate / deathdate strings. They are not filled in by the standard tree gather, so treat them as usually empty.

How It’s Populated

Rows are written during a per-match Compare visit, only when tree gathering is enabled. When the compare response carries the match’s linked tree (the completeTreeData / treedata endpoint), the app walks the pedigree starting at the root person and emits one row per ancestor:

  1. The root person (the match) is written with relid = 1 and gender “U”.
  2. The walk recurses into each person’s father (gender “M”, relid = 2×relid) and mother (gender “F”, relid = 2×relid+1), capturing names, birth/death dates and places, and the parent ID links.
  3. Your own tree is captured the same way once per kit, keyed under your kit’s GUID in matchid, when “gather my tree” is enabled.

Data Preservation Rules

Rows are written as an atomic upsert keyed on (matchid, personId) — re-gathering a match refreshes that person’s fields in place rather than deleting and re-inserting the whole tree. This avoids a window where a tree could be wiped if the re-insert failed midway. If the same person is reached by two ancestral lines within one batch (pedigree collapse), the last write wins.

Related Tables

  • Ancestry_TreeData — per-person tree metadata (tree size, public/private, whether a tree exists). The summary counterpart to this table’s individual people.
  • Ancestry_matchGroups — the master match record. Its matchTreeNodeCount, matchTreeId, and treeId fields are set alongside these tree rows.
  • AncestryAncestorCouple — the common-ancestor couples shared between you and a match, identified from these trees.