Deleting very distant relatives

In my early enthusiasm, many RMs ago, I populated my tree with people who were very distant relatives who now are of no interest and I would now like to identify them and delete them. I could colourise my ancestors and also colourise the descendants of the earliest direct ancestor. I appreciate that one person cannot have two colours. Is it possible to get a complete name list, including any colours and any relationships. If this is not possible, does anyone have any ideas to avoid a tedious exercise.

I don’t know if there is any non-tedious way to do so within RM and would head directly to using sqlite queries on the database to achieve a goal like yours. What comes to mind is the concept of using the consanguinity degree calculated from RM’s Set Relationships tool as the main criterion for a deletion procedure, also done with sqlite. The latter would delete everyone beyond a certain consanguinity degree who was not a spouse of someone within the desired range. For more on consanguinity and how it can be derived from RM data see:
https://sqlitetoolsforrootsmagic.com/color-code-by-consanguinity-degree/

If you use the same filter for color coding with groups you can find who overlaps or not. On the Tools page the Group Tool - combine and manipulate groups is covered in the video below. It starts at the 12:50 mark but I have it set at the beginning of all the group tools first.

Working with Groups in RootsMagic 9

If I were doing this project, I would do it with SQLite as Tom suggests. But SQLite requires programming skills that are outside the ken of most RM users. However, I think you can sort of kind of do this project from inside of RM. The following is not intended as a complete solution, but rather as some ideas.

  • Make a group by marking everybody in your database and unmarking everyone who is in your tree. The people remaining in the group will be people you are not related to at all, not even by marriage. You could then delete this group.
  • Make a group by going to one of your fifth great grandfathers and marking all of his descendants and their spouses. Before completing the definition of the group, go to the child of your fifth great grandfather who is your fourth great grandfather or fourth great grandmother and unmark all their descendants and there spouses. The people remaining in the group are all in theory only very distantly related to you and the people not in the group are more closely related to you. So you could delete that group.

The problem with the second idea is that you can be related to the same person in more than one way. For example, your first cousin could also be your fifth cousin if your lines crossed just so in the past. So you wouldn’t want to delete your fifth cousin who was also your first cousin. But at least this is an idea that you can play with.

You can’t bulk delete people in RM based on color coding. You can now delete people in RM based on groups. So you need to become fluent with groups. If I were trying this myself from within RM rather than using SQLite, I would still color code my groups to make them more visible. But the final delete would still need to be by group rather than by color coding.

1 Like

Could also do by SQL based on Gen up/ down and degree of distance based on Set Relationships
Several Potential ways to do this. – however they would likely want to included spouse of the related. Note as Both Tom and Jerry have mentioned this goes above what average RM users. Yon can use the Subquery to create a group – but RM will advise against doing so as you can mess up your database

SELECT MotherID as PID FROM FamilyTable
LEFT JOIN PersonTable m ON m.PersonID = MotherID
LEFT JOIN PersonTable f ON f.PersonID = FatherID
WHERE (FatherID and m.Relate1+m.Relate2 = 0)
and (MotherID and f.Relate1+f.Relate2 > 0)
UNION
SELECT FatherID as PID FROM FamilyTable
LEFT JOIN PersonTable m ON m.PersonID = MotherID
LEFT JOIN PersonTable f ON f.PersonID = FatherID
WHERE (MotherID and m.Relate1+m.Relate2 = 0)
and (FatherID and f.Relate1+f.Relate2 > 0)
ORDER BY PID

this does if related

SELECT PersonID
FROM PersonTable
WHERE Relate1+Relate2 >0

so if you wanted all ancestors to 10 gens but exclude if certain degrees away (say 9 for example) you could do something like this.

SELECT PersonID
FROM PersonTable
WHERE (Relate1 >0  and Relate1+Relate2<=9) -- degrees less then = 9 and not ancestor
 or (Relate1 =0  and Relate2<=11) -- ancestor less than 10 great

note - this is basic concept – and I did off the top of my head

I would keep your main database intact and just create a new database - use the Drag & Drop, With the menu option you can select the people to move. If you don’t get all the results you wanted, you can always select people to copy. as a side note - anyone I enter, I put their names in Caps. Anyone I add from a cousin gedcom will most likely be lower case.

1 Like