When you're wondering about looping logic, it's best to think about how you would do this if you had to work by hand with paper and pencil.
You'd start with the first master record. You'd run your check on that record. Then you'll need to check each of the child records that correspond to it. Once you're done you'll move on to the second master record.
I imagine your loops would look soemthing like this:
For Each rowMaster as DataRow in dtMaster.Rows
For Each rowChild as DataRow in dtChild.Select("MasterIdFromChildTable=" & rowMaster("MasterIdFromMasterTable"))
Next
Next
You may have to arrange it so that any updating you do the Master table is done after all of the looping. The For Each may not work if you add/delete rows to the table you are looping and you may get an exception. Also, it will work faster if you wait to update everything at the end.
Hope this helps get you started.