create FK relation by judging reference table name and relation name