I think you are overlooking the Maalot, Avivim school bus and Mercaz HaRav massacres. Your point is still well taken but Israel has not been immune.
Yeah the Mercaz HaRav massacre was caused by a Palestinian gunman..which is why they have armed guards..former military and active military protecting the schools. I was in Israel in 2012 for my sisters wedding..you had people walking around with rifles over their shoulders, its just a way of life..you also had to go through metal detectors when you went into the mall