What's the dividing line ...
... between a referential integrity issue and a business logic issue?
Assume tables A and B with fields A.RefId and B.RecordId. There's a foreign key relationship from A.RefId --> B.RecordId.
Let's say the values of A.RefId need to be further restricted: only values of B.RecordId where B.TypeId = 3 can be used.
Is this a business logic issue, or a referential integrity issue?
If it's business logic, does it have any place in the database?
I'd be curious to hear what people think.
Assume tables A and B with fields A.RefId and B.RecordId. There's a foreign key relationship from A.RefId --> B.RecordId.
Let's say the values of A.RefId need to be further restricted: only values of B.RecordId where B.TypeId = 3 can be used.
Is this a business logic issue, or a referential integrity issue?
If it's business logic, does it have any place in the database?
I'd be curious to hear what people think.