If you look at the app "longlines", the GEDCOM file format (not the XML version) and other family tree software, it creates a unique record per-person and per-family unit then uses the ID of those records to create symbolic references to members of families and children.
If you look at this GEDCOM record, it identifies an INDIvidual with id "I25" who is a child (FAMC) of family id F11 and a spouse (FAMS) in families F6 and F12.
0 @I25@ INDI
1 NAME Thomas Trask /Wetmore/ Sr
1 SEX M
1 BIRT
2 DATE 13 March 1866
2 PLAC St. Mary's Bay, Digby, Nova Scotia
2 SOUR Social Security application
1 NATU
2 NAME Thomas T. Wetmore
2 DATE 26 October 1888
2 PLAC Norwich, New London, Connecticut
2 AGE 22 years
2 COUR New London County Court of Common Pleas
2 SOUR court record from National Archives
1 OCCU Antiques Dealer
1 DEAT
2 NAME Thomas Trask Wetmore
2 DATE 17 February 1947
2 PLAC New London, New London, Connecticut
2 AGE 80 years, 11 months, 4 days
2 CAUS Heart Attack
2 SOUR New London Death Records
1 FAMC @F11@
1 FAMS @F6@
1 FAMS @F12@
Human relationships are far more complicated than can be represented in a basic tree-like data structure.