It's probably one-to-many relationship, as 1 user can have many articles, posts, and comments. But an article or comment will belong only to 1 user. This may be the structure of your db:
users: id | username | password | ... articles: id | user_id | title | body | ... comments: id | user_id | article_id | body | ...
Just like user, an article may have one-to-many relationship with comments. An article has many comments but a comment belongs to only one article posted by one user.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us