How to design to avoid two-way reference between two tables
Sounds like you may need a self-join:


Get rid of the relatives table entirely
Define the main_contact as a foreign_key to the id column of the member table.


Or depending on the relationship a many-to-many resolver table in the middle:


Get rid of member_id from relatives 
Get rid of main_contact
from from member 
Add a new table member_relative with the
columns member_id, relative_id and a column to indicate
relationship_type.