They will happen, and it is horrible when they do, but you and your students probably have a much, mich higher risk of dying in a traffic accident driving to school than being gunned down by a mass murderer on school property.
Reasonable efforts should be made to keep weapons out of schools, of course, (just as reasonable efforts should be made to, for example, get small children in child safety seats) but you can't live in fear of these types of events.