Let's say have have two tables, A and B.  

A contains fields: id, a1, a2.  

B contains fields: id, b1, b2.

Asume a one to many relationship from table A to B based on the id field.

Now let's say I want to create a unique constraint on table b that prohibits me from inserting duplicate records based on b1, b2, and a1. Is that possible?