Consider the following scenario:
There are two columns in a table, ACCT_STA_CD (Account Status Code) and ACCT_CLSD_DT (Account Closed Date). In ACCT_STA_CD, the value of 'A' means 'Active'. Since the account is active, there should be no corresponding value for ACCT_CLSD_DT, but for some reason there is. That is a data quality issue which requires the application of a rule/constraint for both columns.
Here's my question: is there any kind of software tool that can do this sort of relationship detection? Something that would tell me that the presence of a value in column a is dependent on a value in column b, or vice versa, but where the columns do not necessarily have a key relationship.