Re: finding missing constraints.
Thursday, May 5, 2005 01:18 PM
Are you saying, you want to find tables where an ordinary column's values are essentially "supposed to be" a reference to a foreign key column in another table, but the relationship is not designated/constrained as such?
We do have situations like that in development, where we just haven't finally stabilized everything yet, or where the values in the referenced key column might be changing and might be null for a while, etc.
But I don't think there is any way of automatically identifying these situations. You have to remember, to keep track of them by hand, so when you are ready to formalize the foreign key relationship, you know which columns in which tables are going to be involved...