One of my tables order
has one to many
relationship with two other tables PaymentMethod1
and PaymentMethod2
. I have created separate "payment method" tables since they have completely different attributes so that I can avoid nulls. But, a particular row in order
will link to a particular row of any one table -- PaymentMethod1
OR PaymentMethod2
. This requires the primary key values to be unique in both of these tables, i.e. no two rows in PaymentMethod1
and PaymentMethod2
can have same primary key.
Am I right in chosing primary keys for PaymentMethod1
and PaymentMethod2
in this fashion? If yes, how do I implement it?