Hello to all you good people - I'm having a bit of trouble working out a suitable design for a system I am developing
Here's the general idea of what I want to model:
My system basically consists of users and events.
Each user can be linked to an event in 2 ways - either by having subscibed to that event, or having created it.
The way I have modeled this is as follows:
I have an events table - containing a unique event ID
I have a user table - containing a unique user ID
I have a user_event table- containing a unique user_event ID and event id/user id as 2 foreign keys
I have a user_event_creation table - with a unique ID and a user_event_id as a foreign key
I have a user_event_subscription table - with a unique ID and user_event_id id as a foreign key
Does this seem like the correct way to have designed the database? I am developing the system in ruby on rails by the way!
Any help is appreciated!
Cheers,
Michael