I\'ve got two tables and I\'ve added a foreign key constraint. Kewl - works great. Now, is it possible to further constrain that relationship against some data in the parent
This sounds like table inheritance - I recently asked a question (can't link because I'm too new here!) whose answer lead to finding this solution.
I'm working with monetary Transactions where a Transaction is the parent table and transaction types such as Cheque, Bank Transfer, and CC are the child tables. Using a lookup table for transaction types, foreign key constraints, and computed columns I was able to enforce the type constraint on each of the child tables.
Check out the article for implementation details.