Should all foreign table references use foreign key constraints
- by TecBrat
Closely related to: Foreign key restrictions -> yes or no?
I asked a question on SO and it led me to ask this here.
If I'm faced with a choice of having a circular reference or just not enforcing the restraint, which is the better choice?
In my particular case I have customers and addresses. I want an address to have a reference to a customer and I want each customer to have a default billing address id and a default shipping address id.
I might query for all addresses that have a certain customer ID or I might query for the address with the ID that matches the default shipping or billing address ids.
I'm not sure yet how the constraints (or lack of) will effect the system as my application and it's data age.