My scenario is difficult too explain in just a short title, so here's an example:
I have multiple tables "birthday_event", "meeting_event", "dinner_event" and they have multiple children in a table called "attendees". Essentially, I have 3 distinct One-to-Many relationships: "birthday_event" has many "attendees", "meeting_event" has many "attendees", and so on.
Each of the "event" tables have their own specific attributes. Normally, I would have a foreign key "event_id" in "attendees" so the relationship is robust, but there are many different event tables that can fulfill the "event_id" attribute, so it won't be a strict foreign key, if that makes sense.
My understanding is that when a foreign key is established, it is strongly linked to an attribute in a single table, not multiple tables like the 3 event tables in the example. It is also my understanding that foreign keys should not ever be null so as to ensure robustness of data. So, what is the best practice for establishing a robust relationship between my many events and many attendees?
My possible solutions:
Use "event_id" as a normal attribute in the "attendees" table so that all three events can use "attendees". The drawback is that this is only a pseudo-foreign key.
Create 3 different "attendee" tables for each event, so there would be "birthday_attendee", "meeting_attendee", and "dinner_attendee" tables. The drawback is more tables.
Using a junction table like "event_attendee" doesn't work because then this table will also have a problem with linking a single foreign key "event_id" to multiple event tables.
Which of these or other solutions is ideal for making the database design understandable, scalable, and high-performance?
By the way, I am planning to conduct model operations on these database tables using a Django backend, if that has any affect on the answer.