Check attribute table referenced foreign key
It's possible to add a_type to b, and have check constraint on b.a_type.  Breaking normalization a bit allows enforcing storing details in proper table . In Oracle you can have 2 constrains supported by the same index, for instance PK on a.id, and UNIQUE on (a.id,a.type) , then some tables that require proper type may have FK to (a.id,a.type), and other tables that don't care about type can refer to a.id .