I have a users(id)
table and a friends(user_id1, user_id2)
where user_id1
and user_id2
are both foreign keys to the users
table.
What relationship is this ?
I think is One to Many, but since I have the user id two times it's a bit confusing. (I have to make a diagram and don't know what relationship to use).
This UML class diagram describes the situation (yuml.me script (click to edit))
In UML terms the line's name is navigable association with known multiplicity.
In order to draw a diagram you don't need to give the relationship another "name"
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句