- A user can create an event (as in physical event, such as a race or festival), this is the "coordinator".
- This new event can be assigned zero or more workers to work the event. They will have access to additional tools/data about the event.
- This event may have zero or more participants that will register through this service.
- Any non-registered user may find a page with details about the event
How do I create a database that efficiently stores this information?
We plan to scale to who knows how many events.
USER
-----------
id (pk)
EVENT
-----------
id (pk)
coordinator (fk, references USER.id)
page
workers
participants
workers
and participants
are lists of USER.ids
.
I can only see it being efficient in one direction, not both. It will be very simple to query to find the workers and participants of any given event, but will be very cumbersome to find the events for any given user.