At the elementary school where my daughter-in-law teaches, the doors are always locked. Visitors must ring a bell. If they have legitimate business they are let in by the principal and escorted by a member of the staff. I expect that would prevent some of the shootings.