I deleted clash of clans for a break. I will re-connect with Supercell ID when I feel like returning. However, will this prevent people from attacking my base? I thought that when I delete the game it erases my base from the system so it can't be attacked. Is this true?
Firstly, the system doesn't know if you've deleted the app from your phone. The only thing it keeps track of is your user ID (or your Supercell ID), and the base(s) attached to it. So if you have not deactivated your account, your base will remain.
Secondly, if you had the intention of starting over to begin with (which is what I take from your statement of "I delete the game it erases my base from the system"), then having your base remain at it's current level, even if it does get raided repeatedly, it is ultimately more productive, no?
Unless you deactivate your account, your base will remain in the system, and it will be raided whenever it is available.
Short answer, no. Long answer, your base is stored in the clash of clans database which is online. Not your phone/tablet/iPad etc. Also, your base can still be attacked by others. But, there can be a rare occasion where your base might get lost (this happened to one of my friends). In that case, you will need to sign in with Game Center, sign into supercell ID, and if those don’t work, contact support.