I am creating a social media site. Users can create a category (1 user to many categories) and each category has many entries. I want to allow users to post on events (1 event can have many posts).
In other words the event owns the post but I want to be able to identify the user who created that post.
Does this mean that I should create 1 event to many posts as well as 1 user to many posts? Does this create normalization problems. What's the best way around this?
I dont see any relation between category and events
In that case add a categoryID as FK in Events
Users table
Primary key
Categories table
Primary key
Foreign Key (users)
Events
Primary key
Posts
Primary key
Foreign Key (events)
Foreign Key (users)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.