No, it’s way more sophisticated than that. Nowadays they are solving cold cases by finding familial matches (partial match indicating kinship) and then doing genealogies to locate family members that match age and location parameters, get dna on the sly from discarded drinks and then getting a warrant.
including relationship between jefferson family and hemings family:
“The results clearly show that the male-line descendants of Field Jefferson and Eston Hemings have identical Y-chromosome haplotypes (the particular combination of variants at defined loci on the chromosome). Scientists note that there is less than a 1 percent probability that this is due to chance. Thus the haplotype match is over one hundred times more likely when Jefferson and Eston Hemings are genetically related through the male line. This study by itself does not establish that Hemings’s father was Thomas Jefferson, only that Hemings’s father was a Jefferson.”
It is my informal understanding that current methods cannot distinguish between the alleged fathership of Thomas Jefferson versus the alleged fathership of various other Jefferson family males in relation to Sally Heming’s offspring, using the Y chromosome.