I'm attempting to design and build a data structure for a blogging platform.
the business of my website follows
- users can create articles.
articles must include one of predefined generic category, and allow many custom_tags
- users can comment on articles
user is able reply to other users.
users can like comments/articles.
users have a public profile.
includes basic public information i.e. title, primary_color, description
- users have preferences/presets to miscellaneous feature for the front-end.
i.e. dark mode, tags that users are following.
Currently this is what I have at the moment. Not sure, if im doing this in the correct manner. It would help greatly if i can get some guidance.
there a few things come to mind:
Do i need to add a new PK for each table that extends from users that has a one-to-one relationship, i.e. user and user_profile or user and user_preference.
I'm thinking that each articles categories itself from one or two listed within global_predefined_categories. I'm not so sure how to map that in tables... While custom tags can be many as 10.