Hi all, this is my first post on this forum I hope I got the right section. I figure what I'm trying to do falls more into the theoretical side of things anyway.

I'm working on a data validation tool which operates on relational data. It should (ideally) be able to operate on any # of tables that are related to each other in various manners.

Part of what the tool does is go through each table by itself and mark records as good or bad. (Bad meaning they failed the validation check).

Now here's where I get stumped.

I would now like to filter out all the "bad" records and their related records out.

E.g. Supposing I have an Authors table which has a 1 to many relation to a Titles table. If an Author's record is bad, I would like to resolve that all Titles related to that Author are bad. I would also like to resolve that if any titles are bad, the author for that title is bad as well as any other titles by that author.

Now this sounds fairly easy with just a few tables but once you start getting into multiple tables that may be related to each other, things get messy. (I dont even want to think about what happens with cyclical relations).

What I would like to know is - is there an algorithm of some sort or a general industry term or topic for this sort of relation resolution? I've been looking around the net and cant find anything - mostly because I have no idea what to even search for.

Any help is appreciated!