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 | Type | Source | Description |
|---|---|---|---|
| Id | int (PK) | Auto | Auto-incrementing primary key |
| matchid | string | Compare | The GUID this tree belongs to. Normally the match’s GUID; for your own tree it is your kit’s GUID. Stored uppercased. |
| surname | string | Compare | Person’s last name (from the pedigree person’s lastName) |
| given | string | Compare | Person’s first / given name (from firstName) |
| birthdate | string | Compare | Birth date as A* supplies it (free-text, e.g. a year or full date) |
| deathdate | string | Compare | Death date as A* supplies it (free-text) |
| birthplace | string | Compare | Birth location name |
| deathplace | string | Compare | Death location name |
| relid | string | Compare | Ahnentafel 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. |
| personId | string | Compare | A*’s person ID within the tree. Unique per person within a match’s tree. |
| fatherId | string | Compare | personId of this person’s father (links to another row), or null |
| motherId | string | Compare | personId of this person’s mother (links to another row), or null |
| subjectGender | string | Compare | Gender of this person within the pedigree: “M” (a father), “F” (a mother), or “U” for the root person |
| source | string | App | Origin of the record. Always “Ancestry” for these rows. |
| created_date | string | App | Date the row was written (yyyy-MM-dd) |
| loginUsername | string | App | DNAGedcom username who gathered this data |
| sync | string | App | Sync status flag (written as “0”) |
| birthdt1 | datetime | Derived | Parsed start of the birth-date range. Legacy/derived column — not populated during normal tree gathering. |
| birthdt2 | datetime | Derived | Parsed end of the birth-date range. Legacy/derived — usually empty. |
| deathdt1 | datetime | Derived | Parsed start of the death-date range. Legacy/derived — usually empty. |
| deathdt2 | datetime | Derived | Parsed end of the death-date range. Legacy/derived — usually empty. |
*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.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:
relid = 1 and gender “U”.relid = 2×relid) and mother (gender “F”, relid = 2×relid+1), capturing names, birth/death dates and places, and the parent ID links.matchid, when “gather my tree” is enabled.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.
matchTreeNodeCount, matchTreeId, and treeId fields are set alongside these tree rows.