I need to store an event in our application. The event can be specific to a user or it can be created by the app administrator for all users to see. What is the best way to store this info while still keeping the foreign key restraints intact. Here is the begining of the design:
Possibilities I have come up with:
1)foreign key that allows nulls(I don't like this idea)
2)Could this be done in a way there are three tables?An event table which store all events and two sub event tables one for admin events and one for personal events. How would this work?
thanks
Code:
Person table
personid name
1 frank
2 steve
event table
eventid description personid
1 lunch 2
Possibilities I have come up with:
1)foreign key that allows nulls(I don't like this idea)
2)Could this be done in a way there are three tables?An event table which store all events and two sub event tables one for admin events and one for personal events. How would this work?
thanks