Is there a way for me to create only one foreign key in one table that refers to 2 different fields in that same table
example:
table: family
ID | bird | bird_mom | bird_dad
1___X_____2_______3
2____A____4________5
3____B
4____M
5____N
ID is primary and autoincrement and also foreign key for “bird_mom” and “bird_dad” field.
So when I change entries X,A,B,M,N I dont need to change it everywhere, but it will always be recognized by foreign key-ID
Typically, “foreign key” is the name for the child field that points to the parent, so you would have two foreign keys: