
Max M. answered 03/14/19
Improve your skills and scores with a Harvard grad.
You're basically correct.
Traditional English grammar says that you should never end sentences with prepositions, and many people still consider such old-fashioned rules more "correct" or formal. However, linguists and other scholars increasingly recognize that a lot of those rules were imposed on English only because they apply in Latin, and a few hundred years ago, people thought that Latin was better than English, and they could make English "better" by making it follow Latin grammar rules. Pretty silly, right?
However, it's a viewpoint that still persists today, in the idea that English was somehow better a few hundred years ago, and that we should still follow those rules. So yes, in that sense, the first is more "formal," though of course it's not for me to say which is easier for you to understand!
So when writing or speaking, my suggestion is: make your own choice. Everyone will understand what you mean when you say "the base which they attach to," but some snobs may consider it a sign of poor education (if so, since this is tagged "ESL," you might ask them how many languages they speak).
And if anyone criticizes you for it, you can remind them that Winston Churchill made fun of exactly this kind of snobbery when he said, "ending sentences with prepositions is a practice up with which I will not put!"