Lets say i have 3 tables:
users - contains information about registered users
posts - contains information about posts that were created by users
comments - all comments on one or multiple posts created by one or multiple users
This image is how my
comments table looks like.
post_id are foreign keys in this table but primary keys in
posts tables respectively. However this structure doesn't seem right to me because as you can see the
user_id may get repeated multiple times.
My question is - is this structure good and should i use this, or should i create a new "middleman" table to hold
post_id in order to somehow reduce redundancy? If so, how? Can you give me an example?