By a cheek swab. And if you are not on file as a felon your DNA is not in the database. To get DNA they need to file through the court if you have not been charged and convicted.
When gametes meet - at conception the DNA is combined. The male gamete (sperm) carries DNA from the male, and the female gamete (ovum) carries DNA from the female. Male and female DNA are combined...