sql - how to make multi_friends relationship -


i have database contains tables: user, post, , comment. able make diagram show relationship between them.

one user has many posts, many likes , many comments.

one post or comment has many likes.

post can have comment also.

see diagram :enter image description here

my question how can make friendship user, (user has many friends) please give me diagram or strategy it, thanks.

table

friends --- source_user_id  fk user dest_user_id    fk user 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -