I have i table users (id,name) and operations (id,date,id_user,id_target_user)
if i didn’t have the id_target_user column I’ll just make on relation
from the users.id to operations.id_user (every user can have multiple several operations)
but the problem is the operation maybe related to another user
how to solve this?
i can’t create 2 relations on the same key can i?
Yes you can.
id_useris a foreign key tousers.id.id_target_useris a foreign key tousers.id.That’s all you need.