HelpDatabase Reference › Ancestry_TreeData

Ancestry_TreeData Table

The Ancestry_TreeData table holds one row of tree summary metadata per person GUID — how big the tree is, whether it is public, private, unlinked, or absent. Where Ancestry_matchTrees stores the individual people in a tree, this table stores the high-level facts about the tree as a whole.

There is exactly one row per GUID: TestGuid carries a unique constraint. The GUID identifies whose tree is being described — usually a match, and sometimes your own kit.

Column Reference

ColumnTypeSourceDescription
Idint (PK)AutoAuto-incrementing primary key
TestGuidstring (unique)CompareThe GUID whose tree this row describes (the dictionary key from the tree-data response). Stored uppercased. One row per GUID.
TreeSizeintCompareNumber of people in the tree (nullable; from treeSize)
PublicTreeboolCompareTrue if the tree is public (from isPublicTree)
PrivateTreeboolCompareTrue if the tree is private (from isPrivateTree)
UnlinkedTreeboolCompareTrue if a tree exists but no person is linked as the DNA tester (from isUnlinkedTree)
NoTreesboolCompareTrue if this person has no tree at all (from hasNoTrees)
TreeUnavailableboolCompareTrue if a tree exists but could not be accessed/retrieved (from isTreeUnavailable)
TreeIdstringLegacyTree identifier. The current tree-data response does not supply this, so it is written as null; an existing non-null value is preserved on re-gather.
The boolean flags are mutually informative rather than mutually exclusive: a match with NoTrees = true will have a 0 / false elsewhere, while a private linked tree shows PrivateTree = true with a populated TreeSize. Use the combination to decide whether tree-based analysis is worthwhile for a given match.

How It’s Populated

Rows are written during per-match Compare/tree gathering. The tree-data endpoint returns a dictionary keyed by GUID; for each entry the app builds one Ancestry_TreeData row and upserts it. The response is processed only when tree gathering visits compare pages — a matches-only gather leaves this table empty.

Data Preservation Rules

Writes are an upsert keyed on TestGuid: if a row already exists for the GUID it is updated in place, otherwise a new row is inserted. The one preserved field is TreeId — because the current response no longer supplies it, a previously stored TreeId is carried forward rather than being overwritten with null. The save path also guards against the unique-constraint race that can occur when two tree-data responses for the same GUID arrive together, falling back to an update of the row that won the race.

Related Tables

  • Ancestry_matchTrees — the individual people that make up the tree this row summarizes.
  • Ancestry_matchGroups — the master match record, whose matchTreeNodeCount and matchTreeIsPrivate fields mirror the same underlying tree facts at the match level.
  • AncestryAncestorCouple — common-ancestor couples derived from comparing trees.