Reputation: 514
I have a table which has some generic data, that must be referenced by a multiple number of other tables. The referenced table can't be simplified to fit columns of the referencing tables. How do I enforce data integrity and relationships in such a scenario?
Edit
By saying that the table can't be simplified, I meant that it is not possible to store the needed data in the tables that need that data and get rid of the referenced table.
Upvotes: 0
Views: 81
Reputation: 31785
Two very flexible ways to enforce RI are with:
Check Constraints - you can write UDFs that encapsulate the logic you want to enforce, and the constraint just checks the UDF for a true or false.
Triggers - The RI logic is written into the trigger code.
Upvotes: 1
Reputation: 889
-> must be referenced by a multiple number of other tables.
Okay, so there must be common column(s) between 'a table' and 'other tables' so you can create a foreign key relationship.
-> The referenced table can't be simplified to fit columns of the referencing tables.
Really not sure what you mean here, so please spell this out. If you can't have common column(s), then you'll need to make a design change based on your requirements.
Upvotes: 0