I have a table that can have a reference to any 1 of 5 tables. Should I have 5 Nullable FK Columns on my Primary Table or should I have a FK reference back to my Primary on each of the 5 potential Secondary tables?
I understand that either will “work” I simply would like some experienced based answers on which provides me with the better structure. For Instance, if I go the 5 Nullable FK’s route I cannot use Cascading Delete.
Thanks to any and all who can spare a moment and provide some insight.
EDIT
My Parent table is NoticeOfAction, which is basically just a questionaire. It can have any 1 of 5 potential Child table’s that are just different subset of questions based on the “Intended Action” chosen in the NOA. So, the NOA table entry has to happen first and can only reference 1 of the 5 child tables at a time. If the NOA entry is deleted I would remove the corresponding entry on the Child Action table as it cannot exist without the NOA itself.
I hope that helps.
I am curious if you can combine the 5 child tables into one in any way, maybe by adding an extra column clarifying the type of the subset of questions. Then, the relationship would simplify to 1 child table referencing 1 parent table. But, of course, the possibility of this depends on your data.