This is pretty old, but the problem arises very often, and this thread comes first in search engines (someone told me;))
A good way to overcome this problem is to work with a "helper table" to link to other tables.
Example: A table entry is associated with many other tables for various reasons. She may also need many foreign keys for herself. Such a table is often obtained from possible indices. I also have three or four of them in my largest projects.
To almost double the possible matches / indexes of RI, you can work with an auxiliary table that has a 1: 1 RI. Join the tblArticle table with only a unique identifier as a field. I call it the same as with the shortletter fk in front of it, as usual. Let me call it tblArticleLinker.
Each table that receives a foreign key from tblArticle, for example Order-Position, gets its connection from tblArticleLinker. -> You do not lose the index for all these links, only one for Linkertable
The only thing you need to make sure is that you always add the key to linkertable when saving, otherwise it is impossible to use a record.
Such a table - in my experience - is much easier to process than the usual approach to splitting fields in different tables. In queries, you don’t particularly need a helper (sometimes queries are faster if you do this), you can directly refer to the table. This is simply not done automatically, as usual.
Tipp: the same approach can be used so that the user can only use the “released” records. Or just use as a hard filter. This helps overcome possible Software-Bugs errors that do not match the logic that they should follow.
Hansi meier
source share